anydi 0.31.0__py3-none-any.whl → 0.32.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- anydi/__init__.py +2 -8
- anydi/_container.py +122 -515
- anydi/_context.py +95 -188
- anydi/_injector.py +94 -0
- anydi/_module.py +4 -41
- anydi/_provider.py +187 -0
- anydi/_scanner.py +14 -68
- anydi/_types.py +4 -103
- anydi/_utils.py +22 -71
- anydi/ext/_utils.py +5 -11
- anydi/ext/django/_settings.py +1 -1
- anydi/ext/django/_utils.py +2 -2
- anydi/ext/django/apps.py +1 -1
- anydi/ext/django/middleware.py +11 -9
- anydi/ext/fastapi.py +4 -24
- anydi/ext/faststream.py +0 -7
- anydi/ext/pydantic_settings.py +2 -2
- anydi/ext/pytest_plugin.py +3 -2
- anydi/ext/starlette/middleware.py +2 -16
- {anydi-0.31.0.dist-info → anydi-0.32.0.dist-info}/METADATA +1 -1
- anydi-0.32.0.dist-info/RECORD +33 -0
- anydi-0.31.0.dist-info/RECORD +0 -31
- {anydi-0.31.0.dist-info → anydi-0.32.0.dist-info}/LICENSE +0 -0
- {anydi-0.31.0.dist-info → anydi-0.32.0.dist-info}/WHEEL +0 -0
- {anydi-0.31.0.dist-info → anydi-0.32.0.dist-info}/entry_points.txt +0 -0
anydi/__init__.py
CHANGED
|
@@ -4,14 +4,9 @@ from typing import Any, cast
|
|
|
4
4
|
|
|
5
5
|
from ._container import Container, request, singleton, transient
|
|
6
6
|
from ._module import Module, provider
|
|
7
|
+
from ._provider import Provider
|
|
7
8
|
from ._scanner import injectable
|
|
8
|
-
from ._types import Marker,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
def dep() -> Any:
|
|
12
|
-
"""A marker for dependency injection."""
|
|
13
|
-
return Marker()
|
|
14
|
-
|
|
9
|
+
from ._types import Marker, Scope
|
|
15
10
|
|
|
16
11
|
# Alias for dependency auto marker
|
|
17
12
|
auto = cast(Any, Marker())
|
|
@@ -23,7 +18,6 @@ __all__ = [
|
|
|
23
18
|
"Provider",
|
|
24
19
|
"Scope",
|
|
25
20
|
"auto",
|
|
26
|
-
"dep",
|
|
27
21
|
"injectable",
|
|
28
22
|
"provider",
|
|
29
23
|
"request",
|