Rodi is a lightweight dependency injection container for Python 3.10+, supporting auto-wiring, singleton and transient lifecycles, and hierarchical containers. Current version is 2.1.0, with regular releases.
pip install rodiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic registration and resolution of a service.
Use 'from rodi import Container' instead of 'from rodi.container import Container'.
Use 'container.register(MyService, lifecycle=Singleton)' instead of 'container.register_singleton(MyService)'.
Register all dependencies explicitly or use type hints correctly.
Use 'from rodi import Container' instead.
Register the type using container.register() before resolving.
No dependency data recorded yet.