You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:description: This example demonstrates a usage of the FastDepends and Dependency Injector.
9
+
10
+
11
+
This example demonstrates how to use ``Dependency Injector`` with `FastDepends <https://github.com/Lancetnik/FastDepends>`_, a lightweight dependency injection framework inspired by FastAPI's dependency system, but without the web framework components.
12
+
13
+
Basic Usage
14
+
-----------
15
+
16
+
The integration between FastDepends and Dependency Injector is straightforward. Simply use Dependency Injector's ``Provide`` marker within FastDepends' ``Depends`` function:
17
+
18
+
.. code-block:: python
19
+
20
+
import sys
21
+
22
+
from dependency_injector import containers, providers
23
+
from dependency_injector.wiring import inject, Provide
0 commit comments