python-dependency-injector
python-dependency-injector copied to clipboard
Dependency injection framework for Python
Bumps [flask](https://github.com/pallets/flask) from 2.1.3 to 2.2.5. Release notes Sourced from flask's releases. 2.2.5 This is a security fix release for the 2.2.x release branch. Note that 2.3.x is the currently...
Pydantic has decoupled `BaseSettings` to a new package `pydantic-settings`, however the decencies are non updated for details please refer https://docs.pydantic.dev/2.8/migration/#basesettings-has-moved-to-pydantic-settings
I tried find examples but attempts were unsuccessful How I understand: Singleton - One object of all container lifetime ThreadSafeSingleton - Same as Singleton and thread safe ContextLocalSingleton - What...
I'm getting a recursion error when an object is instantiated using an overridden container with this rough form. Any thoughts on what the cause might be? I'm new to dependency...
Приветствую, хотел поинтересоваться почему в библиотеке нет рекурсивного связывания на подобие такого, это позволяет делать инъекции не от корня, а от ближайшего родителя: Например: Так: @router.get("/test") @inject async def get_list(s3_manager...
Is there a way to auto-wire? e.g.: class B: @inject def __init__(self, registered_class: IRegisteredClass): ... Why do I need to specify Provider[...]. If all are wired why not just auto-wire...
Is there any way to add a method to container? ``` from dependency_injector import containers class Container(containers.DeclarativeContainer): def check(self): print('check') c = Container() c.check() ``` this code raises `AttributeError: 'DynamicContainer'...
I want to have a Singleton which functions as a cache for a method call. I want the field `file_content` in my container be initialized one time by calling a...
I cannot figure out why the config is a dictionary, while in every example it is an object with "." (dot) operator to access its variables. Here is a simple...
Trying to inject a service from declarative container into sanic handler - but service never get's injected. container example: ```py class AppContainer(containers.DeclarativeContainer): # https://python-dependency-injector.ets-labs.org/providers/inject_self.html __self__ = providers.Self() # This will...