python-dependency-injector
python-dependency-injector copied to clipboard
Dependency injection framework for Python
version: 4.41.0 fastapi version: 0.110.2 In the project I developed with Fastapi, I want to use di as decoupled example at the package level. I have OwnerContainer in owner package...
I've been using this library for a while, and its great. I am often using strings to reference my dependencies, e.g. Provide['stuff']. And I have different application containers that support...
When a generator is provided by `Factory`, I can inject my dependency synchronously, and **example_1** below works as expected. When a generator is provided by `Singleton`, I experience forced asynchronous...
Hello, I'm considering integrating this library into my project but noticed the last update was two years ago. Could you confirm if the repository is still maintained and if it's...
This PR fixes #672
Hi guys, there is a problem, I do not know how to implement this in the context of DI. Idea: I want to make it so that I can conveniently...
I am using a package that import dependency_injector, and when I try to import that package I get the error message "ImportError: cannot import name 'providers' from 'dependency_injector' (c:\ProgramData\Anaconda3\envs\darpa-env\lib\site-packages\dependency_injector\__init__.py)" This...
using Cython 0.29.37 this enables compilation with cpython 3.12 header nothing else was changed
Here's a (pretty sloppy) sort of minimal reproduction, together with some investigation that I've been doing: ``` import gc import time import weakref import objgraph from dependency_injector import containers, providers...
I need to be able to get a service in a sync function. I've tried ```python import asyncio from dependency_injector import containers, providers async def init_async_resource(): await asyncio.sleep(0.1) yield "Initialized"...