FastAPI Cheatsheet 01 — Routing, Path Operations, and Routers

Cheatsheet: GET/POST/etc decorators, path/query/body/header/cookie/form/file params, APIRouter, prefixes, dependencies on routers, and url_path_for.

May 11, 2026 · 4 min · 720 words · Manvendra Rajpoot

FastAPI Textbook Ch. 1 — Introduction, Architecture, and the ASGI Foundation

FastAPI architecture: ASGI, Starlette, Pydantic, dependency injection, and the design choices that make it tick.

May 6, 2026 · 6 min · 1086 words · Manvendra Rajpoot

FastAPI Cheatsheet 02 — Pydantic Request Validation

Cheatsheet: BaseModel, Field, validators, custom errors, nested, discriminated unions, strict mode at the boundary.

May 11, 2026 · 3 min · 560 words · Manvendra Rajpoot

FastAPI Textbook Ch. 2 — Routing, Path Operations, and the Request Anatomy

Path operations, parameter declaration (path / query / body / header / cookie / form / file), routers, prefixes, dependencies on routers, and request internals.

May 6, 2026 · 5 min · 1041 words · Manvendra Rajpoot

FastAPI Cheatsheet 03 — Response Models, Serialization, and Status Codes

Cheatsheet: response_model, exclusion, custom encoders, JSON / HTML / Streaming / File responses, status codes, headers.

May 11, 2026 · 2 min · 390 words · Manvendra Rajpoot

FastAPI Textbook Ch. 3 — Pydantic Models and Request Validation

Request validation with Pydantic v2: BaseModel, Field, validators, custom types, error responses, nested models, discriminated unions, and the FastAPI integration.

May 6, 2026 · 5 min · 970 words · Manvendra Rajpoot

FastAPI Cheatsheet 04 — Dependency Injection

Cheatsheet: Depends, yield-deps, sub-deps, class deps, security deps, dependency_overrides for tests, lifespan.

May 11, 2026 · 3 min · 453 words · Manvendra Rajpoot

FastAPI Textbook Ch. 4 — Response Models, Serialization, and Output Discipline

Output side of FastAPI: response_model, response shaping, custom encoders, status codes, response classes (JSON, HTML, Streaming, File).

May 6, 2026 · 5 min · 897 words · Manvendra Rajpoot

FastAPI Cheatsheet 05 — Authentication and Authorization

Cheatsheet: argon2 hashing, OAuth2 password flow, refresh tokens, sessions, API keys, scopes, RBAC, resource-level authz.

May 11, 2026 · 4 min · 700 words · Manvendra Rajpoot

FastAPI Textbook Ch. 5 — Dependency Injection in Depth

Dependency injection in FastAPI: Depends, scopes, sub-deps, class-based deps, lifecycle (startup/shutdown), and the patterns from production.

May 6, 2026 · 6 min · 1170 words · Manvendra Rajpoot