Morphine is a container based dependency injection framework for Python. Morphine was built from scratch to have most of the features from Dependency Injector since they have stopped updating their package.
Providers are callable objects that are able to provide dependencies. When you want your dependency, you call the provider to provide it for you.
The Factory provider will provide a new instance every time it is called.
The Singleton provider will create a new instance the first time it is called and return that same object for subsequent calls.
The Resource provider is similar to a singleton in that calling it always returns the same instance. The difference being that resources have a startup and a shutdown method. For global configurations, the startup method may not return anything.
Similar to a provider, a Configuration is also a callable. When you call it, it will provide your config as a dictionary. Calling its members will provide the values of those configurations.
A container is a collection of Providers and Configurations. You can inherit from the Container class to define your dependencies and then instantiate your class to retrieve your Providers.