orionis 0.189.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.189.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"
@@ -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.189.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=Ci-jQrqqFUiRRFe_IzFDiGKhSIH9l9_qY7azujinyDQ,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
@@ -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.189.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
184
- orionis-0.189.0.dist-info/METADATA,sha256=RYJwN2IZS3uDxCHR2Yg90FB9ANHDR-fXxz6fTw78_YM,3003
185
- orionis-0.189.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
186
- orionis-0.189.0.dist-info/entry_points.txt,sha256=a_e0faeSqyUCVZd0MqljQ2oaHHdlsz6g9sU_bMqi5zQ,49
187
- orionis-0.189.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
188
- orionis-0.189.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,,