rats-apps 0.1.3.dev10__py3-none-any.whl → 0.1.3.dev11__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 +7 -4
- rats/apps/_executables.py +19 -0
- {rats_apps-0.1.3.dev10.dist-info → rats_apps-0.1.3.dev11.dist-info}/METADATA +1 -1
- {rats_apps-0.1.3.dev10.dist-info → rats_apps-0.1.3.dev11.dist-info}/RECORD +5 -5
- rats_apps-0.1.3.dev10.dist-info/entry_points.txt +0 -3
- {rats_apps-0.1.3.dev10.dist-info → rats_apps-0.1.3.dev11.dist-info}/WHEEL +0 -0
rats/apps/__init__.py
CHANGED
@@ -19,6 +19,7 @@ from ._annotations import (
|
|
19
19
|
)
|
20
20
|
from ._composite_container import CompositeContainer
|
21
21
|
from ._container import Container, DuplicateServiceError, ServiceNotFoundError
|
22
|
+
from ._executables import App, Executable
|
22
23
|
from ._ids import ConfigId, ServiceId
|
23
24
|
from ._namespaces import ProviderNamespaces
|
24
25
|
from ._plugin_container import PluginContainers
|
@@ -26,12 +27,17 @@ from ._scoping import autoscope
|
|
26
27
|
|
27
28
|
__all__ = [
|
28
29
|
"AnnotatedContainer",
|
30
|
+
"App",
|
31
|
+
"CompositeContainer",
|
29
32
|
"ConfigId",
|
30
33
|
"Container",
|
31
34
|
"DuplicateServiceError",
|
35
|
+
"Executable",
|
36
|
+
"PluginContainers",
|
32
37
|
"ProviderNamespaces",
|
33
38
|
"ServiceId",
|
34
39
|
"ServiceNotFoundError",
|
40
|
+
"autoid_service",
|
35
41
|
"autoscope",
|
36
42
|
"config",
|
37
43
|
"container",
|
@@ -39,9 +45,6 @@ __all__ = [
|
|
39
45
|
"fallback_group",
|
40
46
|
"fallback_service",
|
41
47
|
"group",
|
42
|
-
"service",
|
43
48
|
"method_service_id",
|
44
|
-
"
|
45
|
-
"CompositeContainer",
|
46
|
-
"PluginContainers",
|
49
|
+
"service",
|
47
50
|
]
|
@@ -0,0 +1,19 @@
|
|
1
|
+
from abc import abstractmethod
|
2
|
+
from collections.abc import Callable
|
3
|
+
from typing import Protocol
|
4
|
+
|
5
|
+
|
6
|
+
class Executable(Protocol):
|
7
|
+
@abstractmethod
|
8
|
+
def execute(self) -> None:
|
9
|
+
"""Execute the application."""
|
10
|
+
|
11
|
+
|
12
|
+
class App(Executable):
|
13
|
+
_callback: Callable[[], None]
|
14
|
+
|
15
|
+
def __init__(self, callback: Callable[[], None]) -> None:
|
16
|
+
self._callback = callback
|
17
|
+
|
18
|
+
def execute(self) -> None:
|
19
|
+
self._callback()
|
@@ -1,13 +1,13 @@
|
|
1
|
-
rats/apps/__init__.py,sha256=
|
1
|
+
rats/apps/__init__.py,sha256=mDOsXV95S6ixGdlp4B1HmMujUX5sa3GzkcbNIVEKqls,1170
|
2
2
|
rats/apps/_annotations.py,sha256=GT2VGkLO2Re0oZsVd6oQlm0WdJj5NSirGA0cpPmmiik,6993
|
3
3
|
rats/apps/_composite_container.py,sha256=wSWVQWPin2xxIlEoSgk_D1rlc3N2gpTxQ2y9UFdqXy0,553
|
4
4
|
rats/apps/_container.py,sha256=5uiCyxN6HS2z97XcTOFP-t72cNoB1U1sJMkMcfSfDps,3129
|
5
|
+
rats/apps/_executables.py,sha256=6CoSAH-I9kwqtc_aLnJ3O1M-sTPq7MA5aUorN1ryTag,429
|
5
6
|
rats/apps/_ids.py,sha256=dxWCPMpMA_vpaTDJEKNByIBJaX97Db203XqWLhaOezo,457
|
6
7
|
rats/apps/_namespaces.py,sha256=THUV_Xj5PtweC23Ob-zsSpk8exC4fT-qRwjpQ6IDm0U,188
|
7
8
|
rats/apps/_plugin_container.py,sha256=W_xQD2btc0N2dEb3c5tXM-ZZ4A4diMpkCjbOZdlXYuI,853
|
8
9
|
rats/apps/_scoping.py,sha256=plSVEq3rJ8JFAu2epVg2NQpuTbpSTA3a0Tha_DwJL_Y,1453
|
9
10
|
rats/apps/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
|
-
rats_apps-0.1.3.
|
11
|
-
rats_apps-0.1.3.
|
12
|
-
rats_apps-0.1.3.
|
13
|
-
rats_apps-0.1.3.dev10.dist-info/RECORD,,
|
11
|
+
rats_apps-0.1.3.dev11.dist-info/METADATA,sha256=SasWOc2ym5BRF2wiRqpiVQ5jm4FNhIYGca0LdqJveUw,717
|
12
|
+
rats_apps-0.1.3.dev11.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
13
|
+
rats_apps-0.1.3.dev11.dist-info/RECORD,,
|
File without changes
|