vitalik/django-ninja

Ninja + dependency injector?

Closed this issue · 3 comments

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 :)

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

Anydi package has integration with Django-Ninja, so you can easier add it to your project

django ninja is not any differen from any other django project app - no built-in support are planned for now