SQLAlchemy Cheatsheet 08 — Performance, N+1, Bulk Ops, Streaming

Cheatsheet: detect N+1, bulk insert/update, yield_per, load_only, defer, EXPLAIN, slow query logging.

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

Alembic Textbook Ch. 8 — Production Patterns and Recovery

Production Alembic: deploy strategies, recovery from broken migrations, stamp, manual fixes, and the operational checklist.

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

Pydantic v2 Textbook Ch. 8 — JSON Schema Generation

JSON Schema from Pydantic: model_json_schema, OpenAPI integration, custom schemas, examples.

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

SQLAlchemy 2.0 Textbook Ch. 8 — Async SQLAlchemy in Depth

Async patterns in SQLAlchemy 2.0: AsyncSession, expire_on_commit, async streaming, lazy loading caveats, AsyncSession scopes.

May 7, 2026 · 5 min · 880 words · Manvendra Rajpoot

Python Cheatsheet 09 — Profiling (py-spy, cProfile, scalene)

Cheatsheet: when to use each profiler, common commands, reading output.

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

Integration Cheatsheet 09 — Deployment Stack (Docker + K8s + Migrations)

Cheatsheet: Dockerfile, K8s Deployment, migration Job, secrets, probes, graceful shutdown.

May 16, 2026 · 3 min · 629 words · Manvendra Rajpoot

Alembic Cheatsheet 09 — Production Patterns

Cheatsheet: K8s Job vs app-startup, advisory-lock single runner, forward-only, recovery via stamp.

May 15, 2026 · 3 min · 499 words · Manvendra Rajpoot

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

SQLAlchemy Cheatsheet 09 — Migrations Integration (Alembic)

Cheatsheet: Alembic setup with SQLAlchemy 2.0, env.py for sync/async, naming conventions, common ops.

May 12, 2026 · 3 min · 486 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