How modern-python/that-depends works
Main Components
a) Core Framework Components:
• Container System
• BaseContainer (core class)
• Dynamic Container Support
• Multiple Containers Support
b) Providers Layer:
• Resource Providers
• Singleton Providers
• Factory Providers
• Collection Providers
• Context Resources
• Selector Providers
• Object Providers
c) Integration Components:
• FastAPI Integration
• LiteStar Integration
• FastStream Integration
d) Injection System:
• Dependency Resolver
• Injection Mechanism
• Provider Resolution System
┌─ Framework Integrations Layer ─────┐
• FastAPI │ LiteStar │ FastStream │
• ┤
• Injection System Layer │
• ┤
• Providers Layer │
• ┤
• Core Container │
• ┘
Key Relationships
• Blue: Core components
• Green: Providers
• Orange: Integration points
• Purple: Injection system
Specific Implementation Details
a) Core Container Section:
• BaseContainer as the central component
• Resource Context management
• Multiple Container support
b) Providers Section:
• Providers by type (Singleton, Factory, Resource, etc.)
• Inheritance from base Provider class
• Async/sync support capabilities
c) Injection System:
• Injection decorator flow
• Resolver mechanisms
• Provider resolution paths
Additional Elements
• Version compatibility information (Python 3.10-3.13)
• Zero-dependency nature of the package
• Async-first architecture
Technical Details
• Provider resolution mechanisms
• Resource initialization flows
• Async/sync support paths
• Container inheritance patterns
For the principal software engineer, emphasize:
The testing support features
Remember to include notes about:
• Type safety mechanisms
• Resource lifecycle management
• Container initialization patterns
• Integration patterns with supported frameworks
This will create a comprehensive yet clear representation of the "That Depends" framework's architecture while maintaining focus on its key features and design principles.