orionis 0.137.0__py3-none-any.whl → 0.138.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.137.0"
8
+ VERSION = "0.138.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -65,6 +65,17 @@ class Application(metaclass=SingletonMeta):
65
65
  raise RuntimeError("Application has not been initialized yet. Please create an instance first.")
66
66
  return SingletonMeta._instances[cls]
67
67
 
68
+ @classmethod
69
+ def reset(cls):
70
+ """
71
+ Resets the application instance if it exists.
72
+
73
+ This method is used to reset the application instance and clear the singleton instances
74
+ stored in the `SingletonMeta` class.
75
+ """
76
+ if cls in SingletonMeta._instances:
77
+ del SingletonMeta._instances[cls]
78
+
68
79
  def __init__(self, container: Container):
69
80
  """
70
81
  Initializes the Application instance.
@@ -375,4 +386,22 @@ def app_booted():
375
386
  Returns:
376
387
  bool: True if the application has been booted, False otherwise.
377
388
  """
378
- return Application.booted
389
+ return Application.booted
390
+
391
+ def orionis():
392
+ """
393
+ Creates a new instance of the Orionis application.
394
+
395
+ Ensures that any existing singleton instance of `Application` is removed before
396
+ creating a fresh instance. It resets the singleton instances stored in `SingletonMeta`
397
+ and `Container`.
398
+
399
+ Returns
400
+ -------
401
+ Application
402
+ A new instance of the Orionis application.
403
+ """
404
+ Container.reset()
405
+ Application.reset()
406
+
407
+ return Application(Container())
@@ -23,6 +23,14 @@ class Container(IContainer):
23
23
  _instance = None
24
24
  _lock = Lock()
25
25
 
26
+ @classmethod
27
+ def reset(cls):
28
+ """
29
+ Reset the container instance to None, allowing a new instance to be created.
30
+ """
31
+ cls._instance = None
32
+ super().__new__(cls)
33
+
26
34
  def __new__(cls):
27
35
  if cls._instance is None:
28
36
  with cls._lock:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: orionis
3
- Version: 0.137.0
3
+ Version: 0.138.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,6 +1,6 @@
1
1
  orionis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  orionis/cli_manager.py,sha256=oXY5UYvtalP996h7z5iaEc7z5b1hyFWXrLPrvtoxWcU,1368
3
- orionis/framework.py,sha256=k39Ee-GSlP6yasv8A46dYfAnyTTnajA8Dc5OEXoa-Dc,1387
3
+ orionis/framework.py,sha256=ibYZr64Bc-w_H5cCXWA6n4SY7jn5T97yEs1eOABTCGI,1387
4
4
  orionis/installer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  orionis/installer/manager.py,sha256=UfUvHOCqcj6YKuwSS6pmhxRXUNGaMWseZNXBZybKLTk,3143
6
6
  orionis/installer/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -12,7 +12,7 @@ orionis/installer/output/output.py,sha256=eA_3yPUc50RwB829IgUzfipkawCIOIRqQlXuUw
12
12
  orionis/installer/setup/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  orionis/installer/setup/setup.py,sha256=zAZDelFwieZ9HbR_mSgvW9-gI--Zzu__6SZWWw4VEE8,6967
14
14
  orionis/luminate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- orionis/luminate/application.py,sha256=wXBfsdhvH2L6o3HBmifGhZKfpQFY28eWjgRAS5EIyMU,13876
15
+ orionis/luminate/application.py,sha256=L3tk1g8PSSz1HbjnzsoIDS6lvC9re_IzF3umy9o8zeg,14714
16
16
  orionis/luminate/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  orionis/luminate/config/app.py,sha256=7teuVPuaV2ao0M5Bv-jhSgjEwb9DtVwde2saTRmYru4,1737
18
18
  orionis/luminate/config/auth.py,sha256=CG8F0pfVjKz4DY3d1Wi7gscdhnp4TT-Q8SJ2sdsHh18,523
@@ -43,7 +43,7 @@ orionis/luminate/console/output/console.py,sha256=_O2einYXUzgsy1w18aprUmUkBqg4rA
43
43
  orionis/luminate/console/output/executor.py,sha256=Momq8rSbS-p7xUtnJM6CsK4hAyP515jCdN5q77MxLGA,3371
44
44
  orionis/luminate/console/output/progress_bar.py,sha256=IUD3Wqi9dplbrSkeD8v48zBdFA92S4viTKGkoIIXqFw,3098
45
45
  orionis/luminate/console/output/styles.py,sha256=2e1_FJdNpKaVqmdlCx-udzTleH_6uEFE9_TjH7T1ZUk,3696
46
- orionis/luminate/container/container.py,sha256=W7YCLuz44o9TaCsuVuPqJ1zfQ6P9gZmn4dzTMfGSFyE,17015
46
+ orionis/luminate/container/container.py,sha256=7NVx1ELsI0Znnxrmhap8kEMYHLoGJ2qC4deEl0AvpXc,17228
47
47
  orionis/luminate/container/exception.py,sha256=ap1SqYEjQEEHXJJTNmL7V1jrmRjgT5_7geZ95MYkhMA,1691
48
48
  orionis/luminate/container/types.py,sha256=DLComn-gO_5KIm3WpRrkCOOHJ8gvFcvCJLRSeNGiBok,1744
49
49
  orionis/luminate/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -176,9 +176,9 @@ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
176
176
  tests/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
177
177
  tests/tools/class_example.py,sha256=dIPD997Y15n6WmKhWoOFSwEldRm9MdOHTZZ49eF1p3c,1056
178
178
  tests/tools/test_reflection.py,sha256=bhLQ7VGVod4B8sv-rW9AjnOumvaBVsoxieA3sdoM2yM,5244
179
- orionis-0.137.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
180
- orionis-0.137.0.dist-info/METADATA,sha256=Jt0q5kovrzAVGPAeqGUrsNi1joO_e2UIE1RVQ1Owi8U,2970
181
- orionis-0.137.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
182
- orionis-0.137.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
183
- orionis-0.137.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
184
- orionis-0.137.0.dist-info/RECORD,,
179
+ orionis-0.138.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
180
+ orionis-0.138.0.dist-info/METADATA,sha256=JaAol27TvDN6BKeKfnLCrKGnmUy5FdcH892sE7ZQzPk,2970
181
+ orionis-0.138.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
182
+ orionis-0.138.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
183
+ orionis-0.138.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
184
+ orionis-0.138.0.dist-info/RECORD,,