python.
A complete site for FastAPI + Pydantic + uv — from setup to production-ready.
Articles — Page 2
17 postsFastAPI Background Tasks vs asyncio.create_task vs Redis Queue: When Each Fits
Compare FastAPI BackgroundTasks, asyncio.create_task, and Redis-backed queues like arq. Failure isolation, retry semantics, and the request-timeout boundary that decides which one you reach for.
7 minuv Workspace Setup for a Multi-Package Python Monorepo
A working uv workspace layout for multi-package Python monorepos: root pyproject.toml, member pyproject.toml, local path dependencies, single lockfile strategy, and per-member commands.
6 minFastAPI Dependency Injection: Designing for Testability
Practical patterns for FastAPI Depends(), sub-dependencies, and dependency_overrides — so your routes stay thin and your pytest fixtures stay sane.
6 minPython Pattern of the Day: Replacing Nested Try/Except with Result Objects
A practical Python pattern for taming nested error handling: model failures as values with a small Result type instead of stacking try/except blocks.
5 minPydantic v2 Discriminated Unions: Type-Safe Variants Without the Runtime Tax
How Field(discriminator=...) in Pydantic v2 turns Union parsing from O(n) trial-and-error into O(1) tag dispatch — with Literal tags, mypy support, and real failure modes.
6 min