Skip to course content
Free FastAPI backend course

FastAPI for AI Backend Development

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…

2. The published contract consists of…

3. FastAPI's largest practical benefit is usually…

4. A blocking call inside an async def handler…

5. The commonest over-build in an early API is…

---

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.