Python’s dynamic nature is a feature, not a bug! Sometimes we want type safety too. Let’s look at incremental typing, building “static islands” around Django’s dynamic core. Type-safety where you need it, without sacrificing the flexibility of Python that you know and love.
Python’s dynamic nature isn’t a bug—it’s a feature. Django leveraged this from the start, building elegant APIs that would be impossible in a rigidly typed system. Duck typing, runtime introspection, and flexible interfaces gave us the expressiveness we grew up with.
But sometimes we want more. Type safety at API boundaries. Auto-completion that actually works. Data classes instead of ORM objects. The confidence that comes with catching errors before runtime.
The answer isn’t to abandon Python’s dynamic core—it’s to build static islands where they help. Incremental typing lets us wrap specific layers (like the ORM) in type-safe interfaces while leaving Django’s liquid core untouched.
This talk explores when, why, and how to add these type-safe layers, and demonstrates Mantle, utilities for typing around Django’s liquid core. We’ll keep the Python you love, with those little extras when you need them.