injector icon indicating copy to clipboard operation
injector copied to clipboard

Python dependency injection framework, inspired by Guice

Results 54 injector issues
Sort by recently updated
recently updated
newest added

Hi! This issue is somewhat related to #181. Let's say I have the following code structure: ```python from abc import ABC, abstractmethod class FileReader(ABC): @abstractmethod def read(self, file_path: str) ->...

Hello Alec & open source contributors - I love this library - it feels very well designed and strikes a sweet spot between complexity / ease of use. However, I...

This PR attempts to address issue #234 by introducing a unique key dictionary in the `Binder` when `unique=True`.

This has been in my mind for some time so I decided to finally write it. Would that be possible to specify the `Injector` instance that should be used to...

Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3. Release notes Sourced from jinja2's releases. 3.1.3 This is a fix release for the 3.1.x feature branch. Fix for GHSA-h5c8-rqwp-cp95. You are affected if...

dependencies

The default one feels a bit outdated to me, let's try this[1]. I initially wanted to go with the RTD theme but it doesn't support dark mode natively[2]. The theme...

I am using this library in my personal development project with FastAPI + SQLAlchemy. For instance, when creating an application that handles a database, I often find the need for...

The example code on the main page: ``` >>> def configure_for_testing(binder): ... configuration = Configuration(':memory:') ... binder.bind(Configuration, to=configuration, scope=singleton) ``` and ``` >>> injector = Injector([configure_for_testing, DatabaseModule()]) >>> handler =...

Hi! First off, this is a fantastic library - thank you for all your efforts. If I define multiple providers for the same type and then pass both providers to...

Is there any way to use `Injector` library with FastAPI endpoints? The ideia would be to replace completely their Depends feature.