Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ninja + dependency injector? #1406

Open
devjerry0 opened this issue Feb 7, 2025 · 1 comment
Open

Ninja + dependency injector? #1406

devjerry0 opened this issue Feb 7, 2025 · 1 comment

Comments

@devjerry0
Copy link

Anyone else trying to implement the dependency injector package?
Would love some examples on y'alls implementations.

Atm I have been adding it under the main project next to asgi and added asynccontext with lifespan into the asgi file.
I might need to dig deeper into ninja to understand the full lifecycle.
Anyways any tips and tricks or implementation examples would be much appreciated :)

@devjerry0 devjerry0 changed the title Anyone else trying to run this with dependency injector? Anyone else trying to run Ninja with dependency injector? Feb 7, 2025
@devjerry0 devjerry0 changed the title Anyone else trying to run Ninja with dependency injector? Ninja + dependency injector? Feb 7, 2025
@paolodina
Copy link

If I understand correctly what you're trying to achieve, you might find django-ninja-extra interesting. It has built-in support for Injector, is compatible with django-injector, and handles automatic dependency resolution.

Even if it's not exactly what you're looking for, it could serve as a useful reference or give you some ideas. HTH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants