Pydantic Cheatsheet 17 — pydantic.dataclasses

Cheatsheet: pydantic.dataclass vs BaseModel, attrs comparison, stdlib dataclass conversion.

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

Pydantic Cheatsheet 18 — Common Domain Types (IDs, Money, Phone, Email)

Cheatsheet: branded ID types, Decimal for money, phone validation, EmailStr, AwareDatetime.

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

Pydantic Cheatsheet 19 — Testing Pydantic Models

Cheatsheet: parametrized tests, ValidationError assertions, factories, round-trip tests.

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

Pydantic Cheatsheet 20 — Migration v1 → v2

Cheatsheet: method renames, Config → model_config, validator decorators, codemod (bump-pydantic).

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

Pydantic v2 Deep Dive — The Patterns Every Backend Python Developer Needs

Pydantic v2 in production. Model design, validators, serializers, settings, the strict mode, performance characteristics, FastAPI / SQLAlchemy patterns, and the migrations from v1.

April 30, 2026 · 6 min · 1180 words · Manvendra Rajpoot

Structured Output for LLMs in 2026 — Pydantic AI, Instructor, and the End of JSON Parsing

Reliable structured output from LLMs in 2026. Pydantic AI, Instructor, OpenAI’s structured outputs / Anthropic tool calling, retry-on-validation patterns, and the end of homemade JSON parsing.

April 30, 2026 · 6 min · 1273 words · Manvendra Rajpoot

FastAPI + Pydantic v2 + SQLAlchemy 2.0 — Production Patterns for 2026

A complete, opinionated production layout for FastAPI in 2026. Pydantic v2, async SQLAlchemy 2.0, Alembic, dependency injection, structured errors, settings, logging, and the project skeleton that survives the first 50 endpoints.

April 28, 2026 · 8 min · 1521 words · Manvendra Rajpoot

Getting Started with FastAPI: Modern Python APIs Done Right

A practical, hands-on introduction to FastAPI covering type-driven routing, Pydantic validation, async I/O, dependency injection, and a sane project layout.

April 28, 2026 · 5 min · 1017 words · Manvendra Rajpoot