rats-apps 0.1.2.dev12__py3-none-any.whl → 0.1.2.dev13__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.
- rats/apps/__init__.py +1 -0
- rats/apps/_annotations.py +2 -1
- rats/apps/_container.py +0 -2
- rats/apps/_scoping.py +1 -0
- {rats_apps-0.1.2.dev12.dist-info → rats_apps-0.1.2.dev13.dist-info}/METADATA +1 -1
- rats_apps-0.1.2.dev13.dist-info/RECORD +13 -0
- rats_apps-0.1.2.dev12.dist-info/RECORD +0 -13
- {rats_apps-0.1.2.dev12.dist-info → rats_apps-0.1.2.dev13.dist-info}/WHEEL +0 -0
- {rats_apps-0.1.2.dev12.dist-info → rats_apps-0.1.2.dev13.dist-info}/entry_points.txt +0 -0
rats/apps/__init__.py
CHANGED
rats/apps/_annotations.py
CHANGED
@@ -19,6 +19,7 @@ class GroupAnnotations(NamedTuple):
|
|
19
19
|
The `name` attribute is the name of the function, and the `namespace` attribute represents a
|
20
20
|
specific meaning for the group of services.
|
21
21
|
"""
|
22
|
+
|
22
23
|
name: str
|
23
24
|
namespace: str
|
24
25
|
groups: tuple[ServiceId[Any], ...]
|
@@ -30,6 +31,7 @@ class FunctionAnnotations(NamedTuple):
|
|
30
31
|
|
31
32
|
Loosely inspired by: https://peps.python.org/pep-3107/.
|
32
33
|
"""
|
34
|
+
|
33
35
|
providers: tuple[GroupAnnotations, ...]
|
34
36
|
|
35
37
|
def group_in_namespace(
|
@@ -65,7 +67,6 @@ class FunctionAnnotationsBuilder:
|
|
65
67
|
|
66
68
|
|
67
69
|
class AnnotatedContainer(Container):
|
68
|
-
|
69
70
|
def get_namespaced_group(
|
70
71
|
self,
|
71
72
|
namespace: str,
|
rats/apps/_container.py
CHANGED
@@ -7,14 +7,12 @@ from ._namespaces import ProviderNamespaces
|
|
7
7
|
|
8
8
|
|
9
9
|
class ServiceProvider(Protocol[Tco_ServiceType]):
|
10
|
-
|
11
10
|
@abstractmethod
|
12
11
|
def __call__(self) -> Tco_ServiceType:
|
13
12
|
"""Return the service instance."""
|
14
13
|
|
15
14
|
|
16
15
|
class ConfigProvider(ServiceProvider[Tco_ConfigType], Protocol[Tco_ConfigType]):
|
17
|
-
|
18
16
|
@abstractmethod
|
19
17
|
def __call__(self) -> Tco_ConfigType:
|
20
18
|
"""Return the config instance."""
|
rats/apps/_scoping.py
CHANGED
@@ -15,6 +15,7 @@ def autoscope(cls: type[T]) -> type[T]:
|
|
15
15
|
The scoped ServiceId instances have a prefix to eliminate the chance of conflicts across
|
16
16
|
packages.
|
17
17
|
"""
|
18
|
+
|
18
19
|
def wrap(func: Callable[..., Any]) -> Callable[..., Any]:
|
19
20
|
def wrapper(*args: P.args, **kwargs: P.kwargs) -> ServiceId[Any]:
|
20
21
|
result = func(*args, **kwargs)
|
@@ -0,0 +1,13 @@
|
|
1
|
+
rats/apps/__init__.py,sha256=JYVss3L2R4uxdOp4Ozfg_cHWgRvCWq79OyVZefFw9wY,858
|
2
|
+
rats/apps/_annotations.py,sha256=NGCw1JMZdPMoK_pE61iXgjeI1Xn7P5WXLt7t8zWligg,5125
|
3
|
+
rats/apps/_composite_container.py,sha256=wSWVQWPin2xxIlEoSgk_D1rlc3N2gpTxQ2y9UFdqXy0,553
|
4
|
+
rats/apps/_container.py,sha256=5uiCyxN6HS2z97XcTOFP-t72cNoB1U1sJMkMcfSfDps,3129
|
5
|
+
rats/apps/_ids.py,sha256=dxWCPMpMA_vpaTDJEKNByIBJaX97Db203XqWLhaOezo,457
|
6
|
+
rats/apps/_namespaces.py,sha256=THUV_Xj5PtweC23Ob-zsSpk8exC4fT-qRwjpQ6IDm0U,188
|
7
|
+
rats/apps/_plugin_container.py,sha256=W_xQD2btc0N2dEb3c5tXM-ZZ4A4diMpkCjbOZdlXYuI,853
|
8
|
+
rats/apps/_scoping.py,sha256=lRV1DDq-U4mr4WOQhvFjTiCQe2dKY95LNn6b0RXRjFA,1305
|
9
|
+
rats/apps/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
|
+
rats_apps-0.1.2.dev13.dist-info/METADATA,sha256=9no8DPSW8K3aslyueEgkZKSN_pLdgWksD5iOWTlUHsI,717
|
11
|
+
rats_apps-0.1.2.dev13.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
12
|
+
rats_apps-0.1.2.dev13.dist-info/entry_points.txt,sha256=Vu1IgAPQvL4xMJzW_OG2JSPFac7HalCHyXiRr0-OfCI,86
|
13
|
+
rats_apps-0.1.2.dev13.dist-info/RECORD,,
|
@@ -1,13 +0,0 @@
|
|
1
|
-
rats/apps/__init__.py,sha256=EHza57K66uM7w8pFBJBqMWaJ7Xn_7E4hn0xA7k8Ag5U,857
|
2
|
-
rats/apps/_annotations.py,sha256=V6sNsvh66VGB6ciog0AwPgXwTjBrtlIZXT-ZZx_LpdY,5124
|
3
|
-
rats/apps/_composite_container.py,sha256=wSWVQWPin2xxIlEoSgk_D1rlc3N2gpTxQ2y9UFdqXy0,553
|
4
|
-
rats/apps/_container.py,sha256=JSmO4x0JcnM9gQP0ki9JcGzYqbjmgAj79lZw5YfBrqI,3131
|
5
|
-
rats/apps/_ids.py,sha256=dxWCPMpMA_vpaTDJEKNByIBJaX97Db203XqWLhaOezo,457
|
6
|
-
rats/apps/_namespaces.py,sha256=THUV_Xj5PtweC23Ob-zsSpk8exC4fT-qRwjpQ6IDm0U,188
|
7
|
-
rats/apps/_plugin_container.py,sha256=W_xQD2btc0N2dEb3c5tXM-ZZ4A4diMpkCjbOZdlXYuI,853
|
8
|
-
rats/apps/_scoping.py,sha256=-5hl0RoOdQGkxWLIn42hthMUyX8_84sV8H3u40y-gIU,1304
|
9
|
-
rats/apps/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
|
-
rats_apps-0.1.2.dev12.dist-info/METADATA,sha256=_8sVP7M4qfGIXN7QmeFwCXneVH7c4HVXAlrtqIYg8lM,717
|
11
|
-
rats_apps-0.1.2.dev12.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
12
|
-
rats_apps-0.1.2.dev12.dist-info/entry_points.txt,sha256=Vu1IgAPQvL4xMJzW_OG2JSPFac7HalCHyXiRr0-OfCI,86
|
13
|
-
rats_apps-0.1.2.dev12.dist-info/RECORD,,
|
File without changes
|
File without changes
|