orionis 0.57.0__py3-none-any.whl → 0.59.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.
@@ -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
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.57.0"
8
+ VERSION = "0.59.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
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
- config_bootstrapper = self.container.singleton(ConfigBootstrapper)
14
- config = self.container.make(config_bootstrapper)
15
- print(config)
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
@@ -58,7 +58,7 @@ class CommandsBootstrapper(ICommandsBootstrapper):
58
58
  # Define the directories to scan for commands
59
59
  command_dirs = [
60
60
  base_path / "app" / "console" / "commands", # Developer-defined commands
61
- pathlib.Path(__file__).resolve().parent.parent.parent / "console" / "commands" # Core commands
61
+ pathlib.Path(__file__).resolve().parent.parent / "console" / "commands" # Core commands
62
62
  ]
63
63
 
64
64
  for cmd_dir in command_dirs:
@@ -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,6 +1,5 @@
1
1
  from orionis.luminate.app_context import AppContext
2
2
  from orionis.luminate.console.base.command import BaseCommand
3
- from orionis.luminate.cache.console.commands import CacheCommands
4
3
  from orionis.luminate.console.exceptions.cli_exception import CLIOrionisRuntimeError
5
4
 
6
5
  class HelpCommand(BaseCommand):
@@ -39,7 +38,7 @@ class HelpCommand(BaseCommand):
39
38
  with AppContext() as app:
40
39
 
41
40
  # Get the list of commands from the container
42
- commands : dict = app.container._commands
41
+ commands : dict = app._commands
43
42
 
44
43
  # Initialize an empty list to store the rows.
45
44
  rows = []
@@ -9,7 +9,6 @@ from apscheduler.triggers.cron import CronTrigger
9
9
  from apscheduler.triggers.interval import IntervalTrigger
10
10
  from orionis.contracts.console.tasks.i_schedule import ISchedule
11
11
  from orionis.luminate.app_context import AppContext
12
- from orionis.luminate.console.command import Command
13
12
  from orionis.luminate.console.exceptions.cli_exception import CLIOrionisScheduleException
14
13
 
15
14
  class Schedule(ISchedule):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: orionis
3
- Version: 0.57.0
3
+ Version: 0.59.0
4
4
  Summary: Orionis Framework – Elegant, Fast, and Powerful.
5
5
  Home-page: https://github.com/orionis-framework/framework
6
6
  Author: Raul Mauricio Uñate Castro
@@ -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=vsjeBThFCOAyMIZo314Hf8gRrClEnN4Uwbx-vMPKhw4,1386
3
+ orionis/framework.py,sha256=dEMLJBZ9OHsV23BR1pVkA_Vu3x7YGoFh-pdce8fGM_k,1386
4
4
  orionis/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- orionis/contracts/bootstrap/i_command_bootstrapper.py,sha256=kdabnjTRXcab0Kelcst8MhuJ_iP0XX8taChMupwzF1M,1901
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=Rv7DGF5gDAIm8aPfg5xm1ceuye2n1ukor5sF7JU8pf8,629
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=fXOvdeyNoB2oN_o1YzhWMbjLa3Nubgwo5QaTNAfm9N4,6297
60
+ orionis/luminate/bootstrap/command_bootstrapper.py,sha256=OU0hDMtG1xqVbvCneq4C5mlOUu9OmfkxqbvGH59QsUw,6919
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
@@ -81,7 +81,7 @@ orionis/luminate/console/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
81
81
  orionis/luminate/console/base/command.py,sha256=YGHd5xVYILcNhQumi74IRnzvagvjufEO2Bx1CwHRToY,12544
82
82
  orionis/luminate/console/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
83
83
  orionis/luminate/console/commands/cache_clear.py,sha256=KyXVSwtLaV1O1cTEkNzX9czCwEoeQlAjiT0jUFMO8iE,2684
84
- orionis/luminate/console/commands/help.py,sha256=jIcCs-yByFO7Xmv3QwCaOug1Jd-6G_wAezOrE8sIeEc,2363
84
+ orionis/luminate/console/commands/help.py,sha256=wpJz1f-elK-q4D3e1vG6s-gCbJDCl9Oxas2gH_-Ojv0,2286
85
85
  orionis/luminate/console/commands/schedule_work.py,sha256=r9Q-CgX1N_R1qcy0gQuUS6P7ZmAcZ6SALVnJUZmWnQg,1981
86
86
  orionis/luminate/console/commands/tests.py,sha256=Z7e6aM5Vu8C7R8iC8sJgUYVN9aJgtVMkqjUEFxPq91o,1281
87
87
  orionis/luminate/console/commands/version.py,sha256=llVPK6ELtf8dIdPvLbybrtipWwZkzV0EXc9ShL-C-GY,1140
@@ -93,7 +93,7 @@ orionis/luminate/console/output/executor.py,sha256=0_6AGM1vE5umdpVVogQUE5eW9cu5U
93
93
  orionis/luminate/console/output/progress_bar.py,sha256=ssi8Drryr-shl7OxweTgGOhvRvAlCVxjBGm1L1qyO84,3089
94
94
  orionis/luminate/console/output/styles.py,sha256=2e1_FJdNpKaVqmdlCx-udzTleH_6uEFE9_TjH7T1ZUk,3696
95
95
  orionis/luminate/console/tasks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
96
- orionis/luminate/console/tasks/scheduler.py,sha256=YdXOdpGaezuPymVh-QnI4lAT99dKDBADDyU3ceLjU_A,22732
96
+ orionis/luminate/console/tasks/scheduler.py,sha256=zt4p2VGUYGGrG2-E-MxyheKjBqGDJB2c0irULDsBgIw,22678
97
97
  orionis/luminate/container/container.py,sha256=92Vh6IRx6BSWucdg6ls5Oh41KhHkPeIRD_LIHio3nhc,16400
98
98
  orionis/luminate/container/exception.py,sha256=ap1SqYEjQEEHXJJTNmL7V1jrmRjgT5_7geZ95MYkhMA,1691
99
99
  orionis/luminate/container/types.py,sha256=BDcXN0__voRNHZ5Gr5dF0sWIYAQyNk4TxAwILBWyDAA,1735
@@ -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.57.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
148
- orionis-0.57.0.dist-info/METADATA,sha256=yLvm_eP4WXlpxMizPT2l7ZM-20NmKHUtYnfXaH7KBX8,2978
149
- orionis-0.57.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
150
- orionis-0.57.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
151
- orionis-0.57.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
152
- orionis-0.57.0.dist-info/RECORD,,
147
+ orionis-0.59.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
148
+ orionis-0.59.0.dist-info/METADATA,sha256=_8h-LxyiF1ICOFA5ae2idsyw0MD2BkzI4RRTSUc2WyQ,2978
149
+ orionis-0.59.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
150
+ orionis-0.59.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
151
+ orionis-0.59.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
152
+ orionis-0.59.0.dist-info/RECORD,,