Architecting Clean Python: Leveraging Static Typing and Dependency Injection in Scale-Up Codebases
Abstract
Python’s dynamic nature is fantastic for moving fast, but as a codebase grows and more contributors join, untyped code often leads to unexpected runtime errors. Subtle type mismatches turn into production bugs that automated tests can easily miss.
This talk demonstrates how modern Python features like advanced type hints, static analysis tools, and native structural patterns allow you to build enterprise-grade, highly maintainable software. Using a FastAPI backend as our blueprint, we will explore how to enforce strict type boundaries with Pydantic and design a modular architecture using FastAPI's dependency injection engine. You will see firsthand how to construct decoupled, easily testable applications where changing core data layers doesn't require rewriting your business logic.
What you will learn:
* How to use advanced static typing structures (TypeVar, Annotated, Protocol) to catch bugs before execution.
* How to enforce runtime data validation profiles cleanly.
* How to build completely decoupled Python architectures using dependency inversion patterns.
Speaker