FastAPI Dependency Injection: Scopes, Overrides and Testing
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
Tag
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
Profile a slow monolith test suite, fix shared state so parallel tests are safe, then split by module and timing data without making flaky tests faster.
16 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
Learn how to scale a monorepo testing strategy: affected-test selection from the dependency graph, real-dependency integration tests, curated e2e and flake control.
16 min read