python-dependency-injector
python-dependency-injector copied to clipboard
Dependency injection framework for Python
This is a followup to the discussion here: https://github.com/ets-labs/python-dependency-injector/issues/704
There's a PR that came up four months ago. [PR LINK](https://github.com/ets-labs/python-dependency-injector/pull/711) I think the problem has been solved, why hasn't that PR been merged for 4 months?
Hello i am using this example : https://github.com/ets-labs/python-dependency-injector/tree/master/examples/miniapps/fastapi-sqlalchemy/webapp it is working fine . Trying to use different database for testing . but can not setup a pytest fixture for override...
Getting the following error while initializing the container that contains instances that cannot be pickled. Is there a requirement that all the instances created within the container should be picklable?...
**Link to the current version: _[tutorials/cli](https://python-dependency-injector.ets-labs.org/tutorials/cli.html#tests)_** ### Changes Made This pull request proposes the following changes: - Added a new test fixture `finder_mock` for `examples/miniapps/movie-lister/movies/tests.py`. - Updated the example in...
When referencing a singleton via `foo.provided.bar`, we lose type safety because `provided` always resolves to the `ProvidedInstance` rather than the specific type of the dependency. ``` settings = providers.Singleton(Settings) identity_container...
**Before**  **After** 
So I am pulling my hair out on this one, I have a different application where I use `wire(packages=[])` that works which just makes this more frustrating. Here is my...
I have a sanic app. I want to run some background jobs. I have configured the container but am getting unexpected beavior ```python # container.py """Containers module.""" from dependency_injector import...