Module 01 Knowledge Check
5 questions. Pass mark 4 out of 5. Answer every question before checking the answer key below, then retry after reading the feedback.
1. An HTTP API is the right shape when…
- A. the code is complex
- B. something outside your process must call you
- C. you want type checking
- D. the team uses Python
2. The published contract consists of…
- A. the source code
- B. request, response, errors and guarantees
- C. the database schema
- D. the endpoint list
3. FastAPI's largest practical benefit is usually…
- A. raw throughput
- B. one declaration serving as validation, serialisation and docs
- C. async support
- D. automatic caching
4. A blocking call inside an async def handler…
- A. is handled automatically
- B. stalls every other request on that worker
- C. raises a warning
- D. runs in a threadpool
5. The commonest over-build in an early API is…
- A. too many endpoints
- B. a database for data that could live in the request
- C. too much validation
- D. excessive documentation
---
Answer Key and Explanations
Check these only after attempting every question.
1. B - something outside your process must call you
Within one process an import is faster, typed, and cannot return a 500.
2. B - request, response, errors and guarantees
Everything behind it is replaceable; nothing in it can be silently withdrawn.
3. B - one declaration serving as validation, serialisation and docs
It does not make a slow query or a slow model call any faster.
4. B - stalls every other request on that worker
Declare the handler def instead and FastAPI uses a threadpool.
5. B - a database for data that could live in the request
State brings migrations, backups, connection limits and a class of failures.
Practical Check
Apply this module to your own work: complete the module activity for *What FastAPI Is and When an API Is the Right Shape*, then write one sentence naming what your result shows and one naming what it does not.
Strong Answer Pattern
A strong answer names the task, the evidence used, the check performed, and the remaining limitation. It avoids "proved", "guaranteed", or "always" unless the evidence genuinely supports it.
