Start here, and HTTP in 20 minutes
Your plan for these five days
| Day | Module | Time |
|---|---|---|
| 1 | HTTP and ASGI from the ground up | about 1.5 h |
| 2 | Starlette the way inPace uses it | about 1.5 h |
| 3 | FastAPI: types, validation and dependencies | about 1.5 h |
| 4 | Data, async, background work and security | about 1.5 h |
| 5 | Testing, deploying and the interview | about 2 h |
Set up a folder with a virtual environment: python -m venv .venv, then
pip install fastapi uvicorn[standard] httpx pytest jinja2 python-multipart.
inPace is built on Starlette, the toolkit FastAPI itself is built on. Knowing both, and why inPace picked the
smaller one, is a strong interview answer.
A request and a response
POST /learn/42/lesson/m1-l2/done HTTP/1.1
Host: 127.0.0.1:8765
Content-Type: application/x-www-form-urlencoded
X-InPace-Nav: 1
next=m1-l3
HTTP/1.1 303 See Other
Location: /learn/42/lesson/m1-l3?yay=lesson
| Methods | Meaning |
|---|---|
| GET | Read; safe and idempotent; can be cached |
| POST | Create or act; not idempotent |
| PUT / PATCH | Replace / partly change |
| DELETE | Remove; idempotent |
| Status | Means |
|---|---|
| 200, 201, 204 | OK, created, no content |
| 301, 302, 303, 307, 308 | Redirects. 303 means "now GET this", the right answer after a form POST |
| 400, 401, 403, 404, 409, 422 | Bad request, not signed in, not allowed, not found, conflict, invalid data |
| 500, 502, 503 | Server bug, bad gateway, unavailable |
Idempotent means doing it twice has the same effect as once. Interviewers ask about it all the time, usually with "how do you stop a payment from being charged twice?" (an idempotency key).