orionis 0.36.0__py3-none-any.whl → 0.38.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 CHANGED
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.36.0"
8
+ VERSION = "0.38.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -0,0 +1,14 @@
1
+ from orionis.luminate.container.container import Container
2
+ from orionis.luminate.cache.app.config import CacheConfig
3
+ from orionis.luminate.orionis import Orionis
4
+
5
+ class Config:
6
+
7
+ @staticmethod
8
+ def get():
9
+
10
+ if Orionis().isStarted():
11
+ cont = Container()
12
+ return cont.make(CacheConfig).config
13
+
14
+ raise Exception("The application cannot be executed correctly within the Orionis Framework context.")
@@ -4,6 +4,7 @@ from orionis.luminate.cache.app.config import CacheConfig
4
4
  from orionis.luminate.bootstrap.config.register import Register
5
5
  from orionis.luminate.bootstrap.config.bootstrapper import Bootstrapper
6
6
  from orionis.luminate.patterns.singleton import SingletonMeta
7
+
7
8
  class Orionis(metaclass=SingletonMeta):
8
9
  """
9
10
  Context manager for the Orionis application that handles startup and cleanup.
@@ -29,8 +30,8 @@ class Orionis(metaclass=SingletonMeta):
29
30
 
30
31
  Sets up the application instance and initializes state variables.
31
32
  """
32
- self.is_started = False
33
33
  self.container = Container()
34
+ self.is_started = False
34
35
  self.error_info = None
35
36
 
36
37
  def __enter__(self):
@@ -61,8 +62,11 @@ class Orionis(metaclass=SingletonMeta):
61
62
  self.container.make(Bootstrapper)
62
63
 
63
64
  self.is_started = True
65
+
64
66
  return self
67
+
65
68
  except Exception as e:
69
+
66
70
  self.error_info = (e, traceback.format_exc())
67
71
  raise
68
72
 
@@ -89,7 +93,7 @@ class Orionis(metaclass=SingletonMeta):
89
93
  Always returns False so that any exception is propagated.
90
94
  """
91
95
  try:
92
- self.app.finish()
96
+ self.container = None
93
97
  finally:
94
98
  self.is_started = False
95
99
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: orionis
3
- Version: 0.36.0
3
+ Version: 0.38.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=9wNVJxB0HyqUbNesUvkwlsqTyUbZwK6R46iVLE5WVBQ,1715
3
- orionis/framework.py,sha256=nMdN4E08KqdgqppKY-Cw1kB8IY0nWc7d5HSW0EcxNV4,1386
3
+ orionis/framework.py,sha256=n5pPyv6kdLasA7taMYfrcdnZqh9i6z2EPfSmSIavxPA,1386
4
4
  orionis/luminate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- orionis/luminate/orionis.py,sha256=UyXjI9a0d243GSxz-JtQQitq4Vnbn_Pd6lGcwJCB-sI,4038
5
+ orionis/luminate/orionis.py,sha256=T1Al1VxgZ2a5cxh7rOvISBlacMaAaSWH0BxSwh7gfcE,4050
6
6
  orionis/luminate/bootstrap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  orionis/luminate/bootstrap/cli_exception.py,sha256=wDKfEW295c7-bavr7YUHK2CLYcTSZgjT9ZRSBne6GOE,1356
8
8
  orionis/luminate/bootstrap/commands/bootstrapper.py,sha256=TuXuQUzeaiDL8sJyZNdqnFl2h2MfxcnSU045IeIKVQE,4016
@@ -108,6 +108,7 @@ orionis/luminate/contracts/tools/exception_to_dict_interface.py,sha256=rCuhx2tmU
108
108
  orionis/luminate/contracts/tools/reflection_interface.py,sha256=k9y7So3Z-_QFBBaCl-4t50ZRixt1pcxPtpwlo1NrSGk,8140
109
109
  orionis/luminate/contracts/tools/std_interface.py,sha256=VtOlmz7c1llBRVzKnEBA4aJE5m0Y0w7pFJ_1TgG1-G0,1408
110
110
  orionis/luminate/facades/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
111
+ orionis/luminate/facades/config.py,sha256=x_DRpvEPF8FkHpbgNc-hmLz9G5o5HMB_HJDj_9rpfT8,449
111
112
  orionis/luminate/facades/environment.py,sha256=HFnePQKzbBuJxKuL2bv3-6Fwm2xXeJdqDIpGTeY2HUM,2225
112
113
  orionis/luminate/facades/log.py,sha256=yHht-ok-eseVmwZgsAiHuFOS3MRLJ-YJrbG7VmHguMU,1643
113
114
  orionis/luminate/facades/paths.py,sha256=qXU9KvgNw54IsNc82_S66o198CA9bMZqO8wuCMW1Rnk,7300
@@ -146,9 +147,9 @@ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
146
147
  tests/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
147
148
  tests/tools/class_example.py,sha256=dIPD997Y15n6WmKhWoOFSwEldRm9MdOHTZZ49eF1p3c,1056
148
149
  tests/tools/test_reflection.py,sha256=dNN5p_xAosyEf0ddAElmmmTfhcTtBd4zBNl7qzgnsc0,5242
149
- orionis-0.36.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
150
- orionis-0.36.0.dist-info/METADATA,sha256=q_4w4d8Tvw0_9neD0oNvW86I26AyB-TvvXAQANKu0Tw,2978
151
- orionis-0.36.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
152
- orionis-0.36.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
153
- orionis-0.36.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
154
- orionis-0.36.0.dist-info/RECORD,,
150
+ orionis-0.38.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
151
+ orionis-0.38.0.dist-info/METADATA,sha256=GWaytPaHSdZ0qebQTH6TrUh0JadQ3iSUoy00vhau3BQ,2978
152
+ orionis-0.38.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
153
+ orionis-0.38.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
154
+ orionis-0.38.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
155
+ orionis-0.38.0.dist-info/RECORD,,