Interactive course · 25 lessons · ~9 hours

FastAPI, the way senior engineers use it.

Writing your first FastAPI endpoint takes five minutes. Running a FastAPI service that stays fast, correct and secure under real traffic takes years of scars: the blocking call that froze every request, the response model that leaked password hashes, the session that leaked connections, the background task that silently lost work. This course teaches how FastAPI works underneath (ASGI, Starlette, Pydantic) and then everything a team learns in production, with runnable examples whose output is real.

0 of 25 lessons complete0%

The one picture this course is built on

Every request travels the same path. Almost every production problem lives at one specific step on it, and each module of this course owns some of these steps.

ASGI SERVER (uvicorn) → STARLETTE APP → MIDDLEWARE STACK (module 3) routermatch path+ method dependenciesauth, DB session,settings · mod. 2, 4 validationparams + bodyPydantic · module 1 your functionasync: event loopdef: thread pool · 11 response modelfilter + serialize (Rust)lesson 05 errors at any step → exception handlers → a consistent error response (lesson 09) lifespan: pools, clients, config created once at startup, closed at shutdown (lesson 10) after the response is sent: background tasks and request-scoped yield cleanup (lessons 06, 13) Around all of it: tests (19), OpenAPI (20), logs, metrics and traces (21), performance (22), deployment (23).
Versions, and what "real output" means here

Written against FastAPI 0.139, Starlette 1.3 and Pydantic 2.13 on Python 3.14 (FastAPI itself needs Python 3.10+). FastAPI moves quickly, and the course calls out recent changes where they matter: Depends(scope=…) (0.121), Rust-side JSON serialization (0.130), strict Content-Type checking (0.132), Starlette 1.0 (0.133), streaming JSON Lines (0.134) and native Server-Sent Events (0.135). Examples run the app in-process with FastAPI's test client, so every request, status code and body you see was produced by running it. Things that need servers not available here (PostgreSQL, Redis, Docker) are shown and clearly labelled as not run.

Pick a path

~3 hours

New to FastAPI

Lessons 01–10 in order. Everything you need to build a clean, correct service.

~2.5 hours

I already ship FastAPI

Lessons 06, 11, 12, 15, 19, 24. The concurrency model, DI depth, SQLAlchemy sessions, testing, and the pitfalls.

~2 hours

Security review

Lessons 04, 05, 17, 18, 24. Validation, response leaks, authentication, authorization, the OWASP API list.

~2 hours

Taking it to production

Lessons 10, 21, 22, 23, 24. Lifespan, observability, performance, deployment and graceful shutdown.

Ships with a hands-on project

🛠 A production-grade orders API

An order-management service built the way a senior team would: async SQLAlchemy with a session per request, JWT authentication with customer and admin roles and object-level checks, cursor pagination, idempotency keys for safe retries, ETag / If-Match optimistic locking, a Server-Sent Events status stream, a transactional outbox for webhooks, rate limiting, request-ID logging, RFC 9457 errors, health and readiness checks, a Dockerfile, and an async pytest suite. It runs on SQLite with no setup, and on PostgreSQL through Docker Compose.

Open the project →

The curriculum