python-dependency-injector
python-dependency-injector copied to clipboard
Dependency injection framework for Python
Hi, recently I found out that it's possible to specialize the provided type using `Provider[T]` syntax. For example: ```py from abc import ABC from dependency_injector import containers, providers class AbstractClass(ABC):...
Hi, Thank you so much for a wonderful project. I am using dependency injection in a Django side project of mine. I notice a big problem with the way the...
I want to use the object given by another provider for the key of Dict provider. However, as I have found, the value of Dict provider only can be another...
From #582 : > The first one is the possibility of loading configuration from a .json file. I know that I can use .ini, .yaml, and other formats, but I...
I'm guessing I just don't know what I'm doing and you aren't supposed to declare a resource from a dependency, but it seems as though `_check_instance_type` is failing erroneously. ```...
First of all, thanks a lot for this library - it's really great work you are doing here! We are relying on this library for a FastAPI project and we...
I'm making some initial tests and I'd like to wire my service to my controller. Could anyone please tell me what am I missing? This is my controller:  This...
Is there a pattern for propagating the args/kwargs defined in an AbstractSingleton forward during override? ```python from dependency_injector import containers, providers from lume_services.services.data.models.db import ModelDB, ModelDBConfig from lume_services.services.data.models.db.mysql import MySQLModelDBConfig,...
I am wondering if there is a way to communicate a config substructure as kwargs to a provider: ```python from dependency_injector import containers, providers from lume_services.services.data.models.db.mysql import MySQLModelDBConfig class Context(containers.DeclarativeContainer):...
Wasted a couple of hours because I forgot to pass `memo` when using `deepcopy` 😄 Mentioning it explicitly like this will hopefully prevent this for other people in the future.