orionis 0.57.0__py3-none-any.whl → 0.58.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.
- orionis/contracts/bootstrap/i_command_bootstrapper.py +22 -0
- orionis/framework.py +1 -1
- orionis/luminate/app.py +13 -3
- orionis/luminate/bootstrap/command_bootstrapper.py +24 -1
- {orionis-0.57.0.dist-info → orionis-0.58.0.dist-info}/METADATA +1 -1
- {orionis-0.57.0.dist-info → orionis-0.58.0.dist-info}/RECORD +10 -10
- {orionis-0.57.0.dist-info → orionis-0.58.0.dist-info}/LICENCE +0 -0
- {orionis-0.57.0.dist-info → orionis-0.58.0.dist-info}/WHEEL +0 -0
- {orionis-0.57.0.dist-info → orionis-0.58.0.dist-info}/entry_points.txt +0 -0
- {orionis-0.57.0.dist-info → orionis-0.58.0.dist-info}/top_level.txt +0 -0
@@ -56,4 +56,26 @@ class ICommandsBootstrapper(ABC):
|
|
56
56
|
ValueError
|
57
57
|
If the class does not have required attributes or methods.
|
58
58
|
"""
|
59
|
+
pass
|
60
|
+
|
61
|
+
@abstractmethod
|
62
|
+
def get(self, signature: str = None) -> Dict[str, Any]:
|
63
|
+
"""
|
64
|
+
Retrieves a registered command by its signature.
|
65
|
+
|
66
|
+
Parameters
|
67
|
+
----------
|
68
|
+
signature : str
|
69
|
+
The command signature to retrieve.
|
70
|
+
|
71
|
+
Returns
|
72
|
+
-------
|
73
|
+
Dict[str, Any]
|
74
|
+
A dictionary containing the command class, arguments, description, and signature.
|
75
|
+
|
76
|
+
Raises
|
77
|
+
------
|
78
|
+
KeyError
|
79
|
+
If the command signature is not found.
|
80
|
+
"""
|
59
81
|
pass
|
orionis/framework.py
CHANGED
orionis/luminate/app.py
CHANGED
@@ -1,18 +1,28 @@
|
|
1
1
|
from orionis.luminate.container.container import Container
|
2
2
|
from orionis.luminate.bootstrap.config_bootstrapper import ConfigBootstrapper
|
3
|
+
from orionis.luminate.bootstrap.command_bootstrapper import CommandsBootstrapper
|
3
4
|
from orionis.luminate.patterns.singleton import SingletonMeta
|
4
5
|
|
5
6
|
class Application(metaclass=SingletonMeta):
|
6
7
|
|
7
8
|
def __init__(self):
|
9
|
+
|
10
|
+
self._config = {}
|
11
|
+
self._commands = {}
|
12
|
+
|
8
13
|
self.container = Container()
|
9
14
|
self.container.instance(self.container)
|
10
15
|
self._bootstraping()
|
11
16
|
|
12
17
|
def _bootstraping(self):
|
13
|
-
|
14
|
-
|
15
|
-
|
18
|
+
config_bootstrapper_key = self.container.singleton(ConfigBootstrapper)
|
19
|
+
config_bootstrapper: ConfigBootstrapper = self.container.make(config_bootstrapper_key)
|
20
|
+
self._config = config_bootstrapper.get()
|
21
|
+
|
22
|
+
commands_bootstrapper_key = self.container.singleton(CommandsBootstrapper)
|
23
|
+
commands_bootstrapper: CommandsBootstrapper = self.container.make(commands_bootstrapper_key)
|
24
|
+
self._commands = commands_bootstrapper.get()
|
25
|
+
print(self._commands)
|
16
26
|
|
17
27
|
def isBooted(self):
|
18
28
|
return True
|
@@ -147,4 +147,27 @@ class CommandsBootstrapper(ICommandsBootstrapper):
|
|
147
147
|
'arguments': arguments,
|
148
148
|
'description': description,
|
149
149
|
'signature': signature
|
150
|
-
}
|
150
|
+
}
|
151
|
+
|
152
|
+
def get(self, signature: str = None) -> Dict[str, Any]:
|
153
|
+
"""
|
154
|
+
Retrieves a registered command by its signature.
|
155
|
+
|
156
|
+
Parameters
|
157
|
+
----------
|
158
|
+
signature : str
|
159
|
+
The command signature to retrieve.
|
160
|
+
|
161
|
+
Returns
|
162
|
+
-------
|
163
|
+
Dict[str, Any]
|
164
|
+
A dictionary containing the command class, arguments, description, and signature.
|
165
|
+
|
166
|
+
Raises
|
167
|
+
------
|
168
|
+
KeyError
|
169
|
+
If the command signature is not found.
|
170
|
+
"""
|
171
|
+
if signature is None:
|
172
|
+
return self._commands
|
173
|
+
return self._commands[signature]
|
@@ -1,8 +1,8 @@
|
|
1
1
|
orionis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
orionis/cli_manager.py,sha256=0bM-hABXJSoPGuvEgnqeaj9qcLP8VjTQ3z9Mb0TSEUI,1381
|
3
|
-
orionis/framework.py,sha256=
|
3
|
+
orionis/framework.py,sha256=1SuX-fO2e1rTuvmdCIVjhOfzwh24mffYAfBHOkZA2AQ,1386
|
4
4
|
orionis/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
|
-
orionis/contracts/bootstrap/i_command_bootstrapper.py,sha256=
|
5
|
+
orionis/contracts/bootstrap/i_command_bootstrapper.py,sha256=cfpYWSlNhOY1q_C9o0H7F381OoM0Oh0qaeqP-c85nzk,2457
|
6
6
|
orionis/contracts/bootstrap/i_config_bootstrapper.py,sha256=d2TXT74H2fCBbzWgrt9-ZG11S_H_YPQOEcJoIOrsgb0,4462
|
7
7
|
orionis/contracts/bootstrap/i_environment_bootstrapper.py,sha256=MEeZmh0XWvzvWHFB5ZOp5SKY89F1IHsIXJvdjmEncJU,1076
|
8
8
|
orionis/contracts/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -54,10 +54,10 @@ orionis/installer/installer_manager.py,sha256=Hb6T0bmSl39T30maY-nUWkrLhG77JdrKe4
|
|
54
54
|
orionis/installer/installer_output.py,sha256=LeKxzuXpnHOKbKpUtx3tMGkCi2bGcPV1VNnfBxwfxUU,7161
|
55
55
|
orionis/installer/installer_setup.py,sha256=c2HtVklSa-2_-YVonc7fwtoK-RTDqBS2Ybvbekgfqtc,6970
|
56
56
|
orionis/luminate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
57
|
-
orionis/luminate/app.py,sha256=
|
57
|
+
orionis/luminate/app.py,sha256=UoP-uDYX2mgeLMVtJHW4xcu9O47mST14Pcfxdghod5Y,1112
|
58
58
|
orionis/luminate/app_context.py,sha256=XREVkOHU6aP8UB2daA2QbFcOCB8HRmcGXjVbrlW1AHQ,1827
|
59
59
|
orionis/luminate/bootstrap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
60
|
-
orionis/luminate/bootstrap/command_bootstrapper.py,sha256=
|
60
|
+
orionis/luminate/bootstrap/command_bootstrapper.py,sha256=G0qckn4QSi3SRZJCjDApiDhltofb8qp9GOVf0ky0Hew,6926
|
61
61
|
orionis/luminate/bootstrap/config_bootstrapper.py,sha256=Gw83UtPAOggwzqmz062JfJcpIfmZvmIQyZJfgVFiIcQ,7474
|
62
62
|
orionis/luminate/bootstrap/environment_bootstrapper.py,sha256=kBTpc5j01_O5hwTLpKxwx2kOwwjOgJlrqoxlYflmHlE,2758
|
63
63
|
orionis/luminate/bootstrap/exception_bootstrapper.py,sha256=wDKfEW295c7-bavr7YUHK2CLYcTSZgjT9ZRSBne6GOE,1356
|
@@ -144,9 +144,9 @@ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
144
144
|
tests/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
145
145
|
tests/tools/class_example.py,sha256=dIPD997Y15n6WmKhWoOFSwEldRm9MdOHTZZ49eF1p3c,1056
|
146
146
|
tests/tools/test_reflection.py,sha256=bhLQ7VGVod4B8sv-rW9AjnOumvaBVsoxieA3sdoM2yM,5244
|
147
|
-
orionis-0.
|
148
|
-
orionis-0.
|
149
|
-
orionis-0.
|
150
|
-
orionis-0.
|
151
|
-
orionis-0.
|
152
|
-
orionis-0.
|
147
|
+
orionis-0.58.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
|
148
|
+
orionis-0.58.0.dist-info/METADATA,sha256=7RmQw3DFcxR9FHvtNUUvqbCbdyld3v5HqOOWe5-BdzY,2978
|
149
|
+
orionis-0.58.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
150
|
+
orionis-0.58.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
|
151
|
+
orionis-0.58.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
|
152
|
+
orionis-0.58.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|