Pydantic Cheatsheet 09 — pydantic-settings

Cheatsheet: BaseSettings, env_file, env_prefix, nested, secrets_dir, CLI integration.

May 14, 2026 · 2 min · 409 words · Manvendra Rajpoot

Pydantic v2 Textbook Ch. 9 — Settings (pydantic-settings)

Pydantic-settings: typed env config, .env, secrets directory, sources, CLI integration.

May 9, 2026 · 3 min · 495 words · Manvendra Rajpoot

Pydantic Cheatsheet 10 — JSON Schema and OpenAPI

Cheatsheet: model_json_schema modes, json_schema_extra, custom JSON Schema, LLM tools.

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

Pydantic v2 Textbook Ch. 10 — Performance, FastAPI Integration, and Alternatives

Pydantic v2 perf tips, hot path optimization, FastAPI patterns, and when to consider msgspec / attrs.

May 9, 2026 · 3 min · 608 words · Manvendra Rajpoot

Pydantic Cheatsheet 11 — Performance

Cheatsheet: speed pitfalls and fixes; when to reach for msgspec.

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

Pydantic Cheatsheet 12 — Error Handling

Cheatsheet: ValidationError.errors(), loc / type / msg, custom error envelopes, FastAPI 400/422.

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

Pydantic Cheatsheet 13 — ORM Mode (from_attributes)

Cheatsheet: from_attributes=True, computed fields from ORM, eager-loading relations, exclude sensitive.

May 14, 2026 · 3 min · 477 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

Pydantic Cheatsheet 15 — Recursive Models and Forward References

Cheatsheet: self-referencing, model_rebuild, mutually recursive, tree / graph patterns.

May 14, 2026 · 2 min · 355 words · Manvendra Rajpoot

Pydantic Cheatsheet 16 — Computed Fields

Cheatsheet: @computed_field, alias, exclude, type annotation, caching.

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