

Category · Python
A Python API with types and docs out of the box
A first app, path and query parameters, Pydantic models, the database through dependencies, auth, routers, error handling, background tasks, settings, and production. Swagger docs are generated for you.
9 lessons93 min
To the first lessonCheatsheet nowTopics, each as its own lesson

01A first appDemoA decorator over a function, and you have a route with docs.
9 min
02Path and query parametersTypes in arguments are both validation and conversion.
10 min
03Pydantic modelsA class describes the request body. FastAPI validates it for you.
11 min
04The database and DependsA dependency hands out a database session per request and closes it afterwards.
11 min
05Auth and testsThe current user is a dependency too. And TestClient checks the API without a server.
11 min
06APIRouter and project structureA main.py with forty routes is impossible to read. Split them into files.
10 min
07Error handlingYour own exceptions, your own handlers, and one response format.
10 min
08async, background tasks, and lifespanWhat to do before startup, after the response, and while waiting on the network.
11 min
09Settings, CORS, and productionConfiguration from the environment, access for the frontend, and running on a server.
10 min0/9 topics open. This is the course intro, not the whole course on one page.