orionis 0.86.0__py3-none-any.whl → 0.88.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_context.py +27 -50
- {orionis-0.86.0.dist-info → orionis-0.88.0.dist-info}/METADATA +1 -1
- {orionis-0.86.0.dist-info → orionis-0.88.0.dist-info}/RECORD +8 -8
- {orionis-0.86.0.dist-info → orionis-0.88.0.dist-info}/LICENCE +0 -0
- {orionis-0.86.0.dist-info → orionis-0.88.0.dist-info}/WHEEL +0 -0
- {orionis-0.86.0.dist-info → orionis-0.88.0.dist-info}/entry_points.txt +0 -0
- {orionis-0.86.0.dist-info → orionis-0.88.0.dist-info}/top_level.txt +0 -0
orionis/framework.py
CHANGED
orionis/luminate/app_context.py
CHANGED
@@ -1,58 +1,35 @@
|
|
1
|
+
from contextlib import contextmanager
|
1
2
|
from orionis.luminate.app import Application
|
3
|
+
from orionis.luminate.container.container import Container
|
2
4
|
|
3
|
-
|
5
|
+
@contextmanager
|
6
|
+
def app_context():
|
4
7
|
"""
|
5
8
|
Context manager for resolving dependencies within a valid Orionis application context.
|
6
9
|
|
7
|
-
This
|
10
|
+
This function ensures that Orionis is properly initialized before resolving dependencies,
|
8
11
|
similar to how Laravel’s `app()` helper works.
|
9
12
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
__exit__(exc_type, exc_val, exc_tb)
|
15
|
-
Ensures exceptions propagate naturally.
|
16
|
-
"""
|
17
|
-
|
18
|
-
def __enter__(self):
|
19
|
-
"""
|
20
|
-
Validates that the Orionis application is booted before allowing access to the container.
|
21
|
-
|
22
|
-
Returns
|
23
|
-
-------
|
24
|
-
Container
|
25
|
-
The application’s IoC container instance.
|
26
|
-
|
27
|
-
Raises
|
28
|
-
------
|
29
|
-
RuntimeError
|
30
|
-
If the application has not been properly initialized.
|
31
|
-
"""
|
32
|
-
app = Application()
|
33
|
-
if not app.isBooted():
|
34
|
-
raise RuntimeError(
|
35
|
-
"Error: Not running within a valid Orionis Framework context. "
|
36
|
-
"Ensure that the Orionis application is correctly initialized."
|
37
|
-
)
|
38
|
-
return app
|
13
|
+
Yields
|
14
|
+
------
|
15
|
+
Application
|
16
|
+
The initialized Orionis application instance.
|
39
17
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
return False
|
18
|
+
Raises
|
19
|
+
------
|
20
|
+
RuntimeError
|
21
|
+
If the application has not been properly initialized.
|
22
|
+
"""
|
23
|
+
container = Container()
|
24
|
+
app = Application(container)
|
25
|
+
|
26
|
+
if not app.isBooted():
|
27
|
+
raise RuntimeError(
|
28
|
+
"Error: Not running within a valid Orionis Framework context. "
|
29
|
+
"Ensure that the Orionis application is correctly initialized."
|
30
|
+
)
|
31
|
+
|
32
|
+
try:
|
33
|
+
yield app
|
34
|
+
finally:
|
35
|
+
pass
|
@@ -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=a9eWuorQr78aX8JHinJUO2TF-bC220XSF_KZA10CM8w,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
|
@@ -61,7 +61,7 @@ orionis/installer/installer_output.py,sha256=LeKxzuXpnHOKbKpUtx3tMGkCi2bGcPV1VNn
|
|
61
61
|
orionis/installer/installer_setup.py,sha256=c2HtVklSa-2_-YVonc7fwtoK-RTDqBS2Ybvbekgfqtc,6970
|
62
62
|
orionis/luminate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
63
63
|
orionis/luminate/app.py,sha256=8jgfMgcf01PsGBV1YaIUR8axKXkX7MtHNKJI0YEKWWc,11629
|
64
|
-
orionis/luminate/app_context.py,sha256=
|
64
|
+
orionis/luminate/app_context.py,sha256=se2xpsGoy_drcuOROC7OHaIAN5Yd0kbm5V1zzsxxyQc,996
|
65
65
|
orionis/luminate/bootstrap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
66
66
|
orionis/luminate/bootstrap/command_bootstrapper.py,sha256=JJkWWOS2R2Zg7mC7-VMtZ0wAgxlegMkdnqudpbAjxwk,6925
|
67
67
|
orionis/luminate/bootstrap/config_bootstrapper.py,sha256=Gw83UtPAOggwzqmz062JfJcpIfmZvmIQyZJfgVFiIcQ,7474
|
@@ -160,9 +160,9 @@ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
160
160
|
tests/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
161
161
|
tests/tools/class_example.py,sha256=dIPD997Y15n6WmKhWoOFSwEldRm9MdOHTZZ49eF1p3c,1056
|
162
162
|
tests/tools/test_reflection.py,sha256=bhLQ7VGVod4B8sv-rW9AjnOumvaBVsoxieA3sdoM2yM,5244
|
163
|
-
orionis-0.
|
164
|
-
orionis-0.
|
165
|
-
orionis-0.
|
166
|
-
orionis-0.
|
167
|
-
orionis-0.
|
168
|
-
orionis-0.
|
163
|
+
orionis-0.88.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
|
164
|
+
orionis-0.88.0.dist-info/METADATA,sha256=fTPzvmseNnV5r5QaHFAFsxB0Mpj85nn7u5Ko5L_o5h4,2978
|
165
|
+
orionis-0.88.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
166
|
+
orionis-0.88.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
|
167
|
+
orionis-0.88.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
|
168
|
+
orionis-0.88.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|