Dependency injection (DI) is a design pattern used to wire up components with each other. Combining injector and quart brings DI functionality to async web apps. Views define the interfaces they depend on. The framework then provides those dependencies when and where they’re required.
You can abstract common funcionality like database access into shared components. Define a dependency on those components from your views. The dependencies get injected into the views instead of duplicating the instantiation logic. No globals, less mess, cleaner code.
quart-injector draws heavy inspiration from Flask-Injector. But rather than be a direct port, its a from scratch reimplementation for quart.