orionis 0.188.0__py3-none-any.whl → 0.190.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.188.0"
8
+ VERSION = "0.190.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -136,7 +136,7 @@ class Application(metaclass=SingletonMeta):
136
136
  self._loadCommands()
137
137
 
138
138
  # Boot service providers
139
- AsyncExecutor.run(self._bootServiceProviders)
139
+ AsyncExecutor.run(self._bootServiceProviders())
140
140
 
141
141
  # Change the application status to booted
142
142
  Application.boot()
@@ -62,4 +62,4 @@ class Resolve:
62
62
  )
63
63
 
64
64
  # Resolve and return the service associated with the abstract or alias
65
- return AsyncExecutor.run(lambda : container.make(abstract_or_alias))
65
+ return AsyncExecutor.run(container.make(abstract_or_alias))
@@ -0,0 +1,18 @@
1
+ from orionis.luminate.container.container import Container
2
+
3
+ class Facade:
4
+
5
+ _container = Container()
6
+
7
+ @classmethod
8
+ def resolve(cls):
9
+ if not hasattr(cls, "_service"):
10
+ raise ValueError(f"Facade class {cls.__name__} does not define _service attribute.")
11
+ return cls._container.make(cls._service)
12
+
13
+ @classmethod
14
+ def __getattr__(cls, name):
15
+ service = cls.resolve()
16
+ if hasattr(service, name):
17
+ return getattr(service, name)
18
+ raise AttributeError(f"'{cls.__name__}' object has no method '{name}'")
@@ -1,90 +1,5 @@
1
- from orionis.luminate.contracts.facades.log.log_facade import ILog
1
+ from orionis.luminate.contracts.facades.facade import Facade
2
2
  from orionis.luminate.contracts.services.log.log_service import ILogguerService
3
- from orionis.luminate.facades.app_facade import app
4
3
 
5
- class Log(ILog):
6
- """
7
- A facade class for logging messages with different severity levels.
8
-
9
- This class provides static methods to log messages using the `LogguerService`.
10
- It simplifies the process of logging by abstracting the service resolution
11
- and providing a clean interface for logging.
12
-
13
- Methods
14
- -------
15
- info(message: str) -> None
16
- Logs an informational message.
17
- error(message: str) -> None
18
- Logs an error message.
19
- success(message: str) -> None
20
- Logs a success message.
21
- warning(message: str) -> None
22
- Logs a warning message.
23
- debug(message: str) -> None
24
- Logs a debug message.
25
- """
26
-
27
- @staticmethod
28
- def info(message: str) -> None:
29
- """
30
- Logs an informational message.
31
-
32
- Parameters
33
- ----------
34
- message : str
35
- The message to log.
36
- """
37
- _log_service : ILogguerService = app(ILogguerService)
38
- return _log_service.info(message)
39
-
40
- @staticmethod
41
- def error(message: str) -> None:
42
- """
43
- Logs an error message.
44
-
45
- Parameters
46
- ----------
47
- message : str
48
- The message to log.
49
- """
50
- _log_service : ILogguerService = app(ILogguerService)
51
- return _log_service.error(message)
52
-
53
- @staticmethod
54
- def success(message: str) -> None:
55
- """
56
- Logs a success message.
57
-
58
- Parameters
59
- ----------
60
- message : str
61
- The message to log.
62
- """
63
- _log_service : ILogguerService = app(ILogguerService)
64
- return _log_service.success(message)
65
-
66
- @staticmethod
67
- def warning(message: str) -> None:
68
- """
69
- Logs a warning message.
70
-
71
- Parameters
72
- ----------
73
- message : str
74
- The message to log.
75
- """
76
- _log_service : ILogguerService = app(ILogguerService)
77
- return _log_service.warning(message)
78
-
79
- @staticmethod
80
- def debug(message: str) -> None:
81
- """
82
- Logs a debug message.
83
-
84
- Parameters
85
- ----------
86
- message : str
87
- The message to log.
88
- """
89
- _log_service : ILogguerService = app(ILogguerService)
90
- return _log_service.debug(message)
4
+ class Log(Facade):
5
+ _service = ILogguerService
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: orionis
3
- Version: 0.188.0
3
+ Version: 0.190.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/console.py,sha256=4gYWxf0fWYgJ4RKwARvnTPh06FL3GJ6SAZ7R2NzOICw,1342
3
- orionis/framework.py,sha256=b3mhxwluRhkBPTlJOKAyvRghS2XaX2vP5DlQYMbSorw,1469
3
+ orionis/framework.py,sha256=PzdTDacvMrVHETS1YNeeXsDl_Sm5BmnZYuIxFhbK9qY,1469
4
4
  orionis/installer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  orionis/installer/manager.py,sha256=SYP-k_3c2oxFOCCWfMz-wnekWivn3VcFVMUU5e_sJYo,2787
6
6
  orionis/installer/output.py,sha256=7O9qa2xtXMB_4ZvVi-Klneom9YazwygAd_4uYAoxhbU,8548
@@ -10,7 +10,7 @@ orionis/installer/contracts/manager.py,sha256=Zfndhuyu0JaTKo3PsGsKmVsvotQMw8Pmt4
10
10
  orionis/installer/contracts/output.py,sha256=t1KLw610-hHy63UbFFE2BYwWHWRbW8_ofuEvRLx_IUE,983
11
11
  orionis/installer/contracts/setup.py,sha256=aWYkCv-z48bXXZynYapc3uMIE1gyO6XnkTw3b4MTBq4,784
12
12
  orionis/luminate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- orionis/luminate/application.py,sha256=H9GEeL_gn9gjqFkWtPy8GW8mtx0V7Ej3za8D5Sd8vGs,6964
13
+ orionis/luminate/application.py,sha256=AzVepXMIzA23NMWMCzZw9F-B-XIV4ik8aZA5rcPBsbE,6966
14
14
  orionis/luminate/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  orionis/luminate/config/app.py,sha256=7teuVPuaV2ao0M5Bv-jhSgjEwb9DtVwde2saTRmYru4,1737
16
16
  orionis/luminate/config/auth.py,sha256=CG8F0pfVjKz4DY3d1Wi7gscdhnp4TT-Q8SJ2sdsHh18,523
@@ -46,7 +46,7 @@ orionis/luminate/container/container.py,sha256=9xdODX1h4YK6V-THrfgm5XN95imobExzr
46
46
  orionis/luminate/container/container_integrity.py,sha256=lFQ41IN_3Z0SbtJzZ_9jewoaUI4xlsBEFXPfn-p82uI,7976
47
47
  orionis/luminate/container/exception.py,sha256=ap1SqYEjQEEHXJJTNmL7V1jrmRjgT5_7geZ95MYkhMA,1691
48
48
  orionis/luminate/container/lifetimes.py,sha256=2lbdiV7R2WlJf1cLD6eBxLnJud_lZvX1IhQH2Djy3Ww,375
49
- orionis/luminate/container/resolve.py,sha256=ajHKJ7NQxwN8Bmu4PbN-FxCqrUgqwyNtRdY019-cBxQ,2315
49
+ orionis/luminate/container/resolve.py,sha256=Vg0VI3DGzZO6-D3AHX1BpEoiyC5hPDTR-NuiWkl7U_c,2306
50
50
  orionis/luminate/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
51
  orionis/luminate/contracts/application.py,sha256=FIR6WMY0y-Hkjp0jWfjJV9kwIqBb-RB1-Jl0GWCk9eI,1077
52
52
  orionis/luminate/contracts/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -65,6 +65,7 @@ orionis/luminate/contracts/console/output/progress_bar.py,sha256=sOkQzQsliFemqZH
65
65
  orionis/luminate/contracts/container/container.py,sha256=rLOS1eYir1e1e06OVNTGESbR24rFOIU1CVni_8AbHgs,8802
66
66
  orionis/luminate/contracts/container/container_integrity.py,sha256=xigWcyxLUaFoWXEI75ucJ50Ypw2NtOiRp_CgOY3Qk20,4408
67
67
  orionis/luminate/contracts/facades/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
+ orionis/luminate/contracts/facades/facade.py,sha256=oF-PVgumzewpdxh6LgkpY0BUmvD5eoiBg0yOrWrAEKs,586
68
69
  orionis/luminate/contracts/facades/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
69
70
  orionis/luminate/contracts/facades/commands/commands_facade.py,sha256=LpSfZb3lTmhgMx0H42NmFbKLvcOqSDIbpQrkQpF9RPY,1274
70
71
  orionis/luminate/contracts/facades/commands/scheduler_facade.py,sha256=CR2E7WbYGt8ZMpekUzWBHCor3FEnBmYMDwPfKSYPq84,947
@@ -117,7 +118,7 @@ orionis/luminate/facades/environment/environment_facade.py,sha256=byjVQWCQuqjgc2
117
118
  orionis/luminate/facades/files/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
118
119
  orionis/luminate/facades/files/path_facade.py,sha256=z6DLW7IiBc6nonEwcIbylgpbrM9hgVzZ2Cptdxjr93I,9219
119
120
  orionis/luminate/facades/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
120
- orionis/luminate/facades/log/log_facade.py,sha256=h21YefGkmEpumE_rz_d7uMp-rBftLhxR6Eu7Yg_epls,2517
121
+ orionis/luminate/facades/log/log_facade.py,sha256=Lr0GxAT_jlD1F2ygQGkhZql3vJFmz_KXT8S1Ylpq3Vs,195
121
122
  orionis/luminate/facades/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
122
123
  orionis/luminate/facades/tests/tests_facade.py,sha256=hvNMU8idxxfvz4x-1_jeloff2Gee0k61VfUhxDrR6eg,1667
123
124
  orionis/luminate/foundation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -180,9 +181,9 @@ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
180
181
  tests/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
181
182
  tests/tools/class_example.py,sha256=dIPD997Y15n6WmKhWoOFSwEldRm9MdOHTZZ49eF1p3c,1056
182
183
  tests/tools/test_reflection.py,sha256=bhLQ7VGVod4B8sv-rW9AjnOumvaBVsoxieA3sdoM2yM,5244
183
- orionis-0.188.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
184
- orionis-0.188.0.dist-info/METADATA,sha256=t7GdtgFO0YUmT6SPMLFjV0nL-YrkZShRooWxUOYEUoc,3003
185
- orionis-0.188.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
186
- orionis-0.188.0.dist-info/entry_points.txt,sha256=a_e0faeSqyUCVZd0MqljQ2oaHHdlsz6g9sU_bMqi5zQ,49
187
- orionis-0.188.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
188
- orionis-0.188.0.dist-info/RECORD,,
184
+ orionis-0.190.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
185
+ orionis-0.190.0.dist-info/METADATA,sha256=61gDfwMYE8FteRu3JxFdVvHMGFarPLLF91UQYlR3xys,3003
186
+ orionis-0.190.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
187
+ orionis-0.190.0.dist-info/entry_points.txt,sha256=a_e0faeSqyUCVZd0MqljQ2oaHHdlsz6g9sU_bMqi5zQ,49
188
+ orionis-0.190.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
189
+ orionis-0.190.0.dist-info/RECORD,,