FastAPI BackgroundTasks vs Real Job Queues — When to Use Which in 2026
FastAPI BackgroundTasks looks convenient but has real limits. When it’s enough, when you need a real queue, and how to migrate without disrupting users.
FastAPI BackgroundTasks looks convenient but has real limits. When it’s enough, when you need a real queue, and how to migrate without disrupting users.
Production FastAPI dependency injection: typed dep aliases, request-scoped vs app-scoped resources, async deps, lifespan management, and the patterns that keep a 50-endpoint codebase clean.
Day-to-day uv recipes: workspaces, single-file scripts with deps, lockfile workflows, Docker patterns, CI integration, monorepo, and gotchas.
Picking an async database driver in Python 2026. asyncpg vs psycopg 3 async, MySQL aiomysql / asyncmy, SQLite aiosqlite, libsql for Turso, and the performance / feature tradeoffs.
Practical asyncio debugging: detect blocking calls, find task leaks, diagnose slow callbacks, use asyncio’s debug mode, and the patterns that catch bugs before production.
Production WebSocket patterns in FastAPI: connection management, auth, scaling beyond one process, broadcast via Redis Pub/Sub or NATS, and the gotchas that bite.
How to test FastAPI apps that survive: unit, integration with real Postgres, contract via OpenAPI, end-to-end, async-aware fixtures, and the patterns from production codebases.
What 3.13 brought, what’s experimental, and which features matter for production backend Python in 2026 — JIT, free-threaded mode, typing improvements, REPL.
Beyond the SQLAlchemy 2.0 basics: mapped types in depth, async sessions, hybrid properties, lazy/eager strategies, batched inserts, dataclass mixin, and the production patterns.
When to pick Django Ninja, DRF, or FastAPI. The strengths, the type-safety story, async maturity, and the team / project shape that fits each.