python-dependency-injector
python-dependency-injector copied to clipboard
Dependency injection framework for Python
I have the error when install the package with poetry in python 3.12.1 `Note: This error originates from the build backend, and is likely not a problem with poetry but...
Hi, following use case seems broken in versions >= 4.39.0: ```python from dependency_injector import containers, providers from dependency_injector.wiring import inject, Provide class Service: @staticmethod def run(): print("hello world!") class Container(containers.DeclarativeContainer):...
`Closing` doesn't seem to resolve nested dependecies: e.g. when a `Factory` depends on another `Factory` dependent on a `Resource`. I have followed issue #633, and linked PR #636 that dealt...
Based on the example [FastAPI + SQLAlchemy example](https://python-dependency-injector.ets-labs.org/examples/fastapi-sqlalchemy.html) from the documentation i made a myself implementation for work with connections of Async SQLA Core. But I came across the fact...
- `Configuration` provider can be initialised via from_pydantic method from both pydantic.BaseSettings (pydantic v1) and pydantic_settings.BaseSettings (based on pydantic v2). - I also specified flask and Werkzeug (used by flask)...
When using subcontainers to organize layers in an application, there likely won't be circular dependencies between them. However, with domains this is not the case. ``` @dataclass class UserService: payments:...
Hi The decoupled-example code is good, but it lack one important component of DIP rule **(https://www.cs.utexas.edu/users/downing/papers/DIP-1996.pdf)** I mean the "Abstraction" layer which can help make "user" and "photo" compliant to...
Resolve #693. This PR supports using typing.Annotated instead of parameter defaults when defining markers.
I'm using Dependency injector on my FastAPI Project. currently using FastAPI while Injecting some packages on FastAPI + SQLAlchemy + DI Project, for example ```python @router.get("/users") @inject def get_users( user_service:...
Hey, love and use this framework a lot! But am worried about the future of it. With last commit being year ago, I wonder what's the commitment from the maintainers...