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
Copy file name to clipboardExpand all lines: docs/main/changelog.rst
+21-5Lines changed: 21 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,31 @@ that were made in every particular version.
7
7
From version 0.7.6 *Dependency Injector* framework strictly
8
8
follows `Semantic versioning`_
9
9
10
+
4.48.0
11
+
------
12
+
13
+
- Improve performance of wiring (`#897 <https://github.com/ets-labs/python-dependency-injector/pull/897>`_)
14
+
- Add Context Manager support to Resource provider (`#899 <https://github.com/ets-labs/python-dependency-injector/pull/899>`_)
15
+
- Add support for async generator injections (`#900 <https://github.com/ets-labs/python-dependency-injector/pull/900>`_)
16
+
- Fix unintended dependency on ``typing_extensions`` (`#902 <https://github.com/ets-labs/python-dependency-injector/pull/902>`_)
17
+
- Add support for Fast Depends (`#898 <https://github.com/ets-labs/python-dependency-injector/pull/898>`_)
18
+
- Add ``resource_type`` parameter to init and shutdown resources using specialized providers (`#858 <https://github.com/ets-labs/python-dependency-injector/pull/858>`_)
19
+
20
+
4.47.1
21
+
------
22
+
23
+
- Fix typing for wiring marker (`#892 <https://github.com/ets-labs/python-dependency-injector/pull/896>`_)
24
+
- Strip debug symbols in wheels
25
+
10
26
4.47.0
11
-
-------
27
+
------
12
28
13
29
- Add support for ``Annotated`` type for module and class attribute injection in wiring,
- Fix ``root`` property shadowing in ``ConfigurationOption`` (`#875 https://github.com/ets-labs/python-dependency-injector/pull/875`_)
18
-
- Fix incorrect monkeypatching during ``wire()`` that could violate MRO in some classes (`#886 https://github.com/ets-labs/python-dependency-injector/pull/886`_)
33
+
- Fix ``root`` property shadowing in ``ConfigurationOption`` (`#875 <https://github.com/ets-labs/python-dependency-injector/pull/875>`_)
34
+
- Fix incorrect monkeypatching during ``wire()`` that could violate MRO in some classes (`#886 <https://github.com/ets-labs/python-dependency-injector/pull/886>`_)
19
35
- ABI3 wheels are now published for CPython.
20
36
- Drop support of Python 3.7.
21
37
@@ -371,8 +387,8 @@ Many thanks to `ZipFile <https://github.com/ZipFile>`_ for both contributions.
371
387
- Make refactoring of wiring module and tests.
372
388
See PR # `#406 <https://github.com/ets-labs/python-dependency-injector/issues/406>`_.
373
389
Thanks to `@withshubh <https://github.com/withshubh>`_ for the contribution:
374
-
- Remove unused imports in tests.
375
-
- Use literal syntax to create data structure in tests.
390
+
- Remove unused imports in tests.
391
+
- Use literal syntax to create data structure in tests.
376
392
- Add integration with a static analysis tool `DeepSource <https://deepsource.io/>`_.
0 commit comments