FastAPI Cheatsheet 11 — Docker, Kubernetes, and Deploy

Cheatsheet: Dockerfile (multi-stage, distroless), Uvicorn flags, K8s deployment, probes, HPA, lifespan, graceful shutdown.

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

FastAPI Textbook Ch. 11 — Observability: Logging, Tracing, and Metrics

Production observability: structlog with contextvars, OTEL tracing, Prometheus metrics, log/trace correlation, and the patterns that pay back.

May 6, 2026 · 4 min · 819 words · Manvendra Rajpoot

FastAPI Cheatsheet 12 — Middleware Patterns

Cheatsheet: CORS, GZip, sessions, request ID, timing, body inspection, custom ASGI middleware, ordering rules.

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

FastAPI Textbook Ch. 12 — Deployment, Scaling, and Production

Production FastAPI: Uvicorn / Hypercorn / Granian, Dockerfile, K8s deployment, HPA, graceful shutdown, and the operational checklist.

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

FastAPI Cheatsheet 13 — OpenAPI, Swagger UI, and Schema Tweaks

Cheatsheet: customize OpenAPI title/description, exclude routes, tag groups, custom servers, JS clients.

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

Pydantic Cheatsheet 14 — FastAPI Patterns

Cheatsheet: Read/Create/Update model trio, PATCH partial updates, Pagination class, filter from class.

May 14, 2026 · 3 min · 529 words · Manvendra Rajpoot

FastAPI Cheatsheet 14 — Settings, Config, and Environments

Cheatsheet: BaseSettings, env_file, secrets directory, lru_cache, CLI integration, multi-env config.

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

FastAPI Cheatsheet 15 — Common Errors and How to Fix Them

Cheatsheet: 422 patterns, deps not resolving, async/sync mismatch, CORS, OpenAPI weirdness, and quick fixes.

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

FastAPI Cheatsheet 16 — Pagination Patterns

Cheatsheet: offset/limit, keyset, opaque cursor encoding, total counts, generic Page[T] response model.

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

FastAPI Cheatsheet 17 — Caching: HTTP, Redis, fastapi-cache

Cheatsheet: ETag, Cache-Control, Redis cache, fastapi-cache, conditional GET, invalidation.

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