Dependency injection for Python