orionis 0.58.0__py3-none-any.whl → 0.60.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/framework.py +1 -1
- orionis/luminate/app.py +6 -1
- orionis/luminate/bootstrap/command_bootstrapper.py +1 -1
- orionis/luminate/bootstrap/environment_bootstrapper.py +29 -1
- orionis/luminate/console/commands/help.py +1 -2
- orionis/luminate/console/tasks/scheduler.py +0 -1
- {orionis-0.58.0.dist-info → orionis-0.60.0.dist-info}/METADATA +1 -1
- {orionis-0.58.0.dist-info → orionis-0.60.0.dist-info}/RECORD +12 -12
- {orionis-0.58.0.dist-info → orionis-0.60.0.dist-info}/LICENCE +0 -0
- {orionis-0.58.0.dist-info → orionis-0.60.0.dist-info}/WHEEL +0 -0
- {orionis-0.58.0.dist-info → orionis-0.60.0.dist-info}/entry_points.txt +0 -0
- {orionis-0.58.0.dist-info → orionis-0.60.0.dist-info}/top_level.txt +0 -0
orionis/framework.py
CHANGED
orionis/luminate/app.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
import json
|
1
2
|
from orionis.luminate.container.container import Container
|
2
3
|
from orionis.luminate.bootstrap.config_bootstrapper import ConfigBootstrapper
|
3
4
|
from orionis.luminate.bootstrap.command_bootstrapper import CommandsBootstrapper
|
5
|
+
from orionis.luminate.bootstrap.environment_bootstrapper import EnvironmentBootstrapper
|
4
6
|
from orionis.luminate.patterns.singleton import SingletonMeta
|
5
7
|
|
6
8
|
class Application(metaclass=SingletonMeta):
|
@@ -22,7 +24,10 @@ class Application(metaclass=SingletonMeta):
|
|
22
24
|
commands_bootstrapper_key = self.container.singleton(CommandsBootstrapper)
|
23
25
|
commands_bootstrapper: CommandsBootstrapper = self.container.make(commands_bootstrapper_key)
|
24
26
|
self._commands = commands_bootstrapper.get()
|
25
|
-
|
27
|
+
|
28
|
+
environment_bootstrapper_key = self.container.singleton(EnvironmentBootstrapper)
|
29
|
+
environment_bootstrapper: EnvironmentBootstrapper = self.container.make(environment_bootstrapper_key)
|
30
|
+
self._environment = environment_bootstrapper.get()
|
26
31
|
|
27
32
|
def isBooted(self):
|
28
33
|
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
|
61
|
+
pathlib.Path(__file__).resolve().parent.parent / "console" / "commands" # Core commands
|
62
62
|
]
|
63
63
|
|
64
64
|
for cmd_dir in command_dirs:
|
@@ -64,4 +64,32 @@ class EnvironmentBootstrapper(IEnvironmentBootstrapper):
|
|
64
64
|
try:
|
65
65
|
self._environment_vars = dotenv_values(path) # Load environment variables
|
66
66
|
except Exception as e:
|
67
|
-
raise BootstrapRuntimeError(f"Error loading environment variables from {path}: {str(e)}")
|
67
|
+
raise BootstrapRuntimeError(f"Error loading environment variables from {path}: {str(e)}")
|
68
|
+
|
69
|
+
def get(self, key: str = None) -> str:
|
70
|
+
"""
|
71
|
+
Retrieves the value of an environment variable by its key.
|
72
|
+
|
73
|
+
Parameters
|
74
|
+
----------
|
75
|
+
key : str
|
76
|
+
The key of the environment variable to retrieve.
|
77
|
+
|
78
|
+
Returns
|
79
|
+
-------
|
80
|
+
str
|
81
|
+
The value of the environment variable.
|
82
|
+
|
83
|
+
Raises
|
84
|
+
------
|
85
|
+
KeyError
|
86
|
+
If the environment variable does not exist.
|
87
|
+
"""
|
88
|
+
|
89
|
+
if not key:
|
90
|
+
return self._environment_vars
|
91
|
+
|
92
|
+
if key not in self._environment_vars:
|
93
|
+
raise KeyError(f"Environment variable {key} not found")
|
94
|
+
|
95
|
+
return self._environment_vars[key]
|
@@ -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.
|
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
|
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=7jU8FQ6s1qONGzSBizlCo1Hwsszmar6z0OrXGNKlHP0,1386
|
4
4
|
orionis/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
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
|
@@ -54,12 +54,12 @@ 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=RqhaFbBQH78t3IgSQc0FHrsSW414UDgee5e6Oy8JHEY,1446
|
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=OU0hDMtG1xqVbvCneq4C5mlOUu9OmfkxqbvGH59QsUw,6919
|
61
61
|
orionis/luminate/bootstrap/config_bootstrapper.py,sha256=Gw83UtPAOggwzqmz062JfJcpIfmZvmIQyZJfgVFiIcQ,7474
|
62
|
-
orionis/luminate/bootstrap/environment_bootstrapper.py,sha256=
|
62
|
+
orionis/luminate/bootstrap/environment_bootstrapper.py,sha256=jXEhsNni9asUGvTmajOAkTzWgrgWACow4wFcegHVgpA,3461
|
63
63
|
orionis/luminate/bootstrap/exception_bootstrapper.py,sha256=wDKfEW295c7-bavr7YUHK2CLYcTSZgjT9ZRSBne6GOE,1356
|
64
64
|
orionis/luminate/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
65
65
|
orionis/luminate/config/app.py,sha256=7teuVPuaV2ao0M5Bv-jhSgjEwb9DtVwde2saTRmYru4,1737
|
@@ -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=
|
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=
|
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.
|
148
|
-
orionis-0.
|
149
|
-
orionis-0.
|
150
|
-
orionis-0.
|
151
|
-
orionis-0.
|
152
|
-
orionis-0.
|
147
|
+
orionis-0.60.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
|
148
|
+
orionis-0.60.0.dist-info/METADATA,sha256=UFymQ43HgvS2dzN96oBXRJoz8uJqUqZckBcRQ9itm4g,2978
|
149
|
+
orionis-0.60.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
150
|
+
orionis-0.60.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
|
151
|
+
orionis-0.60.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
|
152
|
+
orionis-0.60.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|