modern-di-fastapi 0.4.0__py3-none-any.whl → 0.4.2__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.
- modern_di_fastapi/__init__.py +2 -2
- modern_di_fastapi/main.py +1 -1
- {modern_di_fastapi-0.4.0.dist-info → modern_di_fastapi-0.4.2.dist-info}/METADATA +1 -1
- modern_di_fastapi-0.4.2.dist-info/RECORD +6 -0
- modern_di_fastapi-0.4.0.dist-info/RECORD +0 -6
- {modern_di_fastapi-0.4.0.dist-info → modern_di_fastapi-0.4.2.dist-info}/WHEEL +0 -0
modern_di_fastapi/__init__.py
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from modern_di_fastapi.main import
|
|
1
|
+
from modern_di_fastapi.main import FromDI, build_di_container, fetch_di_container, setup_di
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
__all__ = [
|
|
5
|
-
"
|
|
5
|
+
"FromDI",
|
|
6
6
|
"build_di_container",
|
|
7
7
|
"fetch_di_container",
|
|
8
8
|
"setup_di",
|
modern_di_fastapi/main.py
CHANGED
|
@@ -43,5 +43,5 @@ class Dependency(typing.Generic[T_co]):
|
|
|
43
43
|
return await self.dependency.async_resolve(request_container)
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
def
|
|
46
|
+
def FromDI(dependency: providers.AbstractProvider[T_co], *, use_cache: bool = True) -> T_co: # noqa: N802
|
|
47
47
|
return typing.cast(T_co, fastapi.Depends(dependency=Dependency(dependency), use_cache=use_cache))
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
modern_di_fastapi/__init__.py,sha256=t4ox50Pc4k7bDNprfg3_ujqj4dwidTTuzV9WRNH-EOs,190
|
|
2
|
+
modern_di_fastapi/main.py,sha256=-LoYLK-0wqBguzpuYXsDRbVqg9Q0sEqfYDwJNegMoCY,1653
|
|
3
|
+
modern_di_fastapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
modern_di_fastapi-0.4.2.dist-info/METADATA,sha256=PkzDUpUtVRLAh08Ivw6T1N209jtSkWqNpguwECcUT8o,926
|
|
5
|
+
modern_di_fastapi-0.4.2.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
6
|
+
modern_di_fastapi-0.4.2.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
modern_di_fastapi/__init__.py,sha256=LSjAug5Mj6Bw7dAR7lWJpRjV9WMT8r9vSGJRHghXF_s,192
|
|
2
|
-
modern_di_fastapi/main.py,sha256=20znQkJZmsAmhehZ3-Cv2D13--SiCz2EkqjPuTkfpCI,1654
|
|
3
|
-
modern_di_fastapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
modern_di_fastapi-0.4.0.dist-info/METADATA,sha256=Aye0Hpe0RmbyJHb4L94YoeLLKa47CDf8uhbqr7681_8,926
|
|
5
|
-
modern_di_fastapi-0.4.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
6
|
-
modern_di_fastapi-0.4.0.dist-info/RECORD,,
|
|
File without changes
|