SQLAlchemy Cheatsheet 11 — Events and Hooks

Cheatsheet: engine events (connect/checkout/before_cursor_execute), session events (before_commit), mapper hooks (before_insert/update/delete), attribute events.

May 12, 2026 · 3 min · 566 words · Manvendra Rajpoot

SQLAlchemy 2.0 Textbook Ch. 11 — Testing

Testing SQLAlchemy: real DBs via testcontainers, per-test transactions, factory_boy, async fixtures, and CI patterns.

May 7, 2026 · 4 min · 694 words · Manvendra Rajpoot

Python Cheatsheet 12 — Standard Library Highlights

Cheatsheet: collections, json, os, sys, subprocess, secrets, hashlib, hmac.

May 17, 2026 · 3 min · 605 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

SQLAlchemy Cheatsheet 12 — Repository and Unit-of-Work Pattern

Cheatsheet: repository classes, unit-of-work, generic base repo, service-layer separation.

May 12, 2026 · 3 min · 633 words · Manvendra Rajpoot

SQLAlchemy 2.0 Textbook Ch. 12 — Production Patterns

Production SQLAlchemy: pool sizing with PgBouncer, read replica routing, OTEL instrumentation, multi-tenancy with RLS, and graceful failure modes.

May 7, 2026 · 4 min · 760 words · Manvendra Rajpoot

Python Cheatsheet 13 — httpx (Sync + Async HTTP Client)

Cheatsheet: httpx Client / AsyncClient, requests, timeouts, retries, streaming.

May 17, 2026 · 3 min · 580 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

SQLAlchemy Cheatsheet 13 — Soft Delete, Audit, and Timestamps

Cheatsheet: SoftDeleteMixin, auto-timestamps via events, audit log table, with_loader_criteria for transparent filtering.

May 12, 2026 · 3 min · 576 words · Manvendra Rajpoot

Python Cheatsheet 14 — CLI Tools (Typer / Click / argparse)

Cheatsheet: Typer for modern CLIs, Click for power users, argparse for stdlib.

May 17, 2026 · 3 min · 489 words · Manvendra Rajpoot