Docker Multi-Stage Build for Python APIs: Venv-First Guide
Build smaller Python API images with a docker multi-stage build: pass one venv between stages, order layers for caching, use uv and slim bases safely.
13 min read
Tag
Build smaller Python API images with a docker multi-stage build: pass one venv between stages, order layers for caching, use uv and slim bases safely.
13 min read
How FastAPI dependency injection resolves a per-request graph, manages app-lifetime resources, cleans up with yield, and stays testable with dependency_overrides.
14 min read
Set up structlog in FastAPI: bind request IDs via contextvars, route uvicorn and stdlib logs through one processor chain, and emit correlated JSON logs.
13 min read
Learn how SQLAlchemy async and asyncpg relate in FastAPI, how to wire sessions and connection pools, avoid lazy-loading traps, and pick the right layer.
13 min read
Compare uv, Poetry and pip-tools for API services: hash-verified lockfiles, Docker builds, CI checks, cross-platform locks and a safe migration path.
13 min read
Use FastAPI dependency injection to own SQLAlchemy session and auth lifetimes, compose Depends chains, and test cleanly with dependency overrides.
18 min read
Set up an Nx Python monorepo where Poetry and uv projects coexist: layout, dependency graph, cache inputs, CI, migration, and when to avoid it.
12 min read
Choose between FastAPI BackgroundTasks, ARQ, and Celery based on durability, retries, and isolation, with idempotency, enqueue, and testing guidance.
15 min read
Learn why blocking calls stall Python asyncio services, how to detect and offload them, and how to manage tasks, cancellation, concurrency and shutdown.
14 min read
Choose among Python backend frameworks by deciding how much the framework should own and whether your API workload truly needs async Python.
13 min read