python-dependency-injector icon indicating copy to clipboard operation
python-dependency-injector copied to clipboard

Dependency injection framework for Python

Results 239 python-dependency-injector issues
Sort by recently updated
recently updated
newest added

Hi @rmk135 You did a great job with this library! Thank you very much for that! Yet, I'm having a hard time with a very common approach when using `Resource`:...

question

While this works ``` @routes.get('/health') @inject async def health(_: web.Request, async_session: SessionMaker = Provide[Container.session_maker]) -> web.Response: async with async_session() as session: query = text('select version(), current_database(), current_user, session_user') res =...

I was trying out the async resource provider to verify that it is actually closing the resource. However, I noticed that it is not closing the resource. After deep investigations...

Struggling with an issue when pass `providers.Configuration` directly to Object. In my code I have something like global context, and I want to keep configs instance in this context directly....

Hi, probably a simple question, but I can not find a straight answer anywhere on it: - Is there a way to use a method of one provider in another...

Hi, I decided to switch to set up with multiple Containers used in one main container. Copied code from example: `https://python-dependency-injector.ets-labs.org/examples/application-multiple-containers.html` So my code looks merely the same with one...

Version 4.39.1 Instead of providing the configuration value it returns config is setup as shown `config = providers.Configuration( yaml_files="default.yaml")` and default.yaml does exist. and a call that relies on the...

Given a class known at runtime (dynamic) with dependencies in the c'tor, can we use the container to initialize such class? I saw the guide of [dynamic containers](https://python-dependency-injector.ets-labs.org/containers/dynamic.html), but it...

Hello, I don't know if it is available or not at the moment, but I would like to know if exists a particular feature. I developed a library that uses...

Hi, consider the following class: ```python @dataclass class X: a: int b: int ``` My aim is to have `b` injected and have a single instance of `X` for each...