Alembic Textbook Ch. 3 — Writing Migrations Manually

Manual migrations: op API, ALTER patterns, batch ops for SQLite, data migrations, idempotent migrations.

May 10, 2026 · 4 min · 752 words · Manvendra Rajpoot

Pydantic v2 Textbook Ch. 3 — Validators in Depth

All Pydantic v2 validation hooks: field_validator, model_validator, mode=before/after, custom validators via Annotated.

May 9, 2026 · 4 min · 743 words · Manvendra Rajpoot

Postgres SQLAlchemy Textbook Ch. 3 — Postgres Indexes in SQLAlchemy

Postgres index types via SQLAlchemy: B-tree, GIN, GiST, BRIN, HASH, partial, expression, INCLUDE indexes, and concurrent creation.

May 8, 2026 · 4 min · 731 words · Manvendra Rajpoot

SQLAlchemy 2.0 Textbook Ch. 3 — Schema and the Type System

Schema in SQLAlchemy 2.0: typed mapped columns, Python types vs DB types, defaults, indexes, constraints, table_args.

May 7, 2026 · 5 min · 962 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

Alembic Textbook Ch. 4 — Branching, Merging, and Multiple Heads

Alembic branching: how multiple revisions create branches, merging strategies, and team workflows.

May 10, 2026 · 3 min · 592 words · Manvendra Rajpoot

Pydantic v2 Textbook Ch. 4 — Serialization in Depth

Output side: model_dump, model_dump_json, field/model serializers, exclude/include, mode=python/json, by_alias.

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

Postgres SQLAlchemy Textbook Ch. 4 — Full-Text Search

Practical full-text search in Postgres via SQLAlchemy: tsvector, GIN, websearch_to_tsquery, ranking, and stemming.

May 8, 2026 · 3 min · 562 words · Manvendra Rajpoot

SQLAlchemy 2.0 Textbook Ch. 4 — The Session and the Unit of Work

Session deep dive: lifecycle, identity map, flush, commit, expire_on_commit, refresh, the unit of work.

May 7, 2026 · 5 min · 953 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