python-dependency-injector
python-dependency-injector copied to clipboard
Dependency injection framework for Python
Hello ets-labs, I felt really great on this morning for applying this awesome tool! I almost had been finishing organizing dependency injection with fastapi during today, but there was a...
Hi having trouble with the Dependency Injector's `multiple containers` functionality please check this documentation segment: https://python-dependency-injector.ets-labs.org/examples/application-multiple-containers.html#main-module ``` @inject def main( email: str, password: str, photo: str, user_service: UserService = Provide[Application.services.user],...
In asyncio daemon tutorial, at the part before define the `Dockerfile` content, it's said it will use `python:3.9-buster`, but in `Dockerfile`, it uses `python:3.10-buster` in `FROM` tag. This PR proposes...
My app wires up some dependencies on intialization and I want to override those during my unit-tests but since they are already injected I'm unable to override them. This can...
Hello. Thank you for building and maintaining awesome project. FastAPI recently announced a new feature called Annotated. [link](https://github.com/tiangolo/fastapi/releases/tag/0.95.0) Currently, dependency-injector is not compatible with this feature. How about modify it...
Fix issues found when using `Closing` to implement per-function scope for `Resources`. - Fixes #702: e.g. when a `Factory` depends on another `Factory` dependent on a `Resource` - Fixes a...
`ThreadSafeSingleton` is a handy provider, and I can see there are a lot of questions about it, can you please add documentation describing the synchronization implementation details, and considerations.
Will this example (https://github.com/ets-labs/python-dependency-injector/tree/master/examples/miniapps/fastapi-sqlalchemy) be a production ready setup with connection pooling etc?
We recently refreshed dependencies of a django based application that uses dependency-injector v4.41.0. Whenever we try to go beyond django 3.1.14 (i.e. >= 3.2.0) we get the following error on...
Trying to understand how to correctly inject dependencies into a class constructor, the following is a sandbox example where I've extracted the key parts from a broader project. ```python from...