FastAPI tutorials
29 articles · page 2 of 2Hand-written tutorials, ordered as a recommended learning path.
- 21 FastAPI Deploy Deploy FastAPI to production with Gunicorn managing Uvicorn workers. Cover process counts, timeouts, and health checks.
- 22 FastAPI Middleware Learn how FastAPI middleware works under the hood and write your own for logging, timing, and request enrichment.
- 23 OpenAPI Customization Tailor FastAPI's auto-generated OpenAPI schema: tags, summaries, examples, response models, custom operation IDs, security schemes, and a custom Swagger UI your team will actually use.
- 24 Pydantic Deep Dive Master Pydantic models in FastAPI: type coercion, validators, nested models, settings, and tips for clean request and response schemas.
- 25 Rate Limiting Add rate limiting to FastAPI using slowapi and Redis: token buckets vs fixed windows, per-user and per-IP limits, returning proper headers, and avoiding the most common production mistakes.
- 26 SQLModel vs SA Compare SQLModel and raw SQLAlchemy for FastAPI projects and learn how to pick the right one for your team.
- 27 FastAPI Streaming Stream large files, generated text, and Server-Sent Events from FastAPI without loading everything into memory.
- 28 FastAPI + pytest Write fast, reliable tests for FastAPI apps using TestClient, pytest fixtures, dependency overrides, and a separate test database.
- 29 FastAPI WS Build real-time features with FastAPI WebSockets. Manage connections, broadcast messages, and handle disconnects cleanly.