orionis 0.193.0__py3-none-any.whl → 0.195.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.193.0"
8
+ VERSION = "0.195.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -1,18 +1,21 @@
1
1
  from orionis.luminate.container.container import Container
2
+ from orionis.luminate.support.asyn_run import AsyncExecutor
2
3
 
3
- class Facade:
4
+ class FacadeMeta(type):
5
+ def __getattr__(cls, name):
6
+ service = cls.resolve()
7
+ return getattr(service, name)
8
+
9
+
10
+ # Clase base para las fachadas usando la metaclase
11
+ class Facade(metaclass=FacadeMeta):
4
12
 
5
13
  _container = Container()
6
14
 
7
15
  @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)
16
+ def getFacadeAccessor(cls):
17
+ raise NotImplementedError("Debes definir el nombre del servicio")
12
18
 
13
19
  @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}'")
20
+ def resolve(cls):
21
+ return AsyncExecutor.run(cls._container.make(cls.getFacadeAccessor()))
@@ -2,4 +2,7 @@ from orionis.luminate.contracts.facades.facade import Facade
2
2
  from orionis.luminate.contracts.services.log.log_service import ILogguerService
3
3
 
4
4
  class Log(Facade):
5
- _service = ILogguerService
5
+
6
+ @classmethod
7
+ def getFacadeAccessor(cls):
8
+ return ILogguerService
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: orionis
3
- Version: 0.193.0
3
+ Version: 0.195.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=dytxNBcs4haJcwosjYc8TDbh8aqdzcNvMb2etGk10Fc,1469
3
+ orionis/framework.py,sha256=bCLZJxPci2g-4X3TFzsf_MXKlVuK3CxEoxEi9kBQg3c,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,7 +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
+ orionis/luminate/contracts/facades/facade.py,sha256=iDFlEQCIb6-G6bY3a7aIUt5wksHI6b_QwOGLgmcLRUE,627
69
69
  orionis/luminate/contracts/facades/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
70
70
  orionis/luminate/contracts/facades/commands/commands_facade.py,sha256=LpSfZb3lTmhgMx0H42NmFbKLvcOqSDIbpQrkQpF9RPY,1274
71
71
  orionis/luminate/contracts/facades/commands/scheduler_facade.py,sha256=CR2E7WbYGt8ZMpekUzWBHCor3FEnBmYMDwPfKSYPq84,947
@@ -118,7 +118,7 @@ orionis/luminate/facades/environment/environment_facade.py,sha256=byjVQWCQuqjgc2
118
118
  orionis/luminate/facades/files/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
119
119
  orionis/luminate/facades/files/path_facade.py,sha256=z6DLW7IiBc6nonEwcIbylgpbrM9hgVzZ2Cptdxjr93I,9219
120
120
  orionis/luminate/facades/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
121
- orionis/luminate/facades/log/log_facade.py,sha256=Lr0GxAT_jlD1F2ygQGkhZql3vJFmz_KXT8S1Ylpq3Vs,195
121
+ orionis/luminate/facades/log/log_facade.py,sha256=u13p3r8Upq2-VNYM73icoVuxn-xpNdVz-Z7Ejoh_cSM,248
122
122
  orionis/luminate/facades/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
123
123
  orionis/luminate/facades/tests/tests_facade.py,sha256=hvNMU8idxxfvz4x-1_jeloff2Gee0k61VfUhxDrR6eg,1667
124
124
  orionis/luminate/foundation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -181,9 +181,9 @@ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
181
181
  tests/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
182
182
  tests/tools/class_example.py,sha256=dIPD997Y15n6WmKhWoOFSwEldRm9MdOHTZZ49eF1p3c,1056
183
183
  tests/tools/test_reflection.py,sha256=bhLQ7VGVod4B8sv-rW9AjnOumvaBVsoxieA3sdoM2yM,5244
184
- orionis-0.193.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
185
- orionis-0.193.0.dist-info/METADATA,sha256=9h6YK6U3wekQApndb7WrwXwrLMZ_KWgFK9yK2B8J8sg,3003
186
- orionis-0.193.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
187
- orionis-0.193.0.dist-info/entry_points.txt,sha256=a_e0faeSqyUCVZd0MqljQ2oaHHdlsz6g9sU_bMqi5zQ,49
188
- orionis-0.193.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
189
- orionis-0.193.0.dist-info/RECORD,,
184
+ orionis-0.195.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
185
+ orionis-0.195.0.dist-info/METADATA,sha256=A4tOJYnNbnx50lHim1VhK5FIWIpaKaJKRJeMoJ_BKzM,3003
186
+ orionis-0.195.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
187
+ orionis-0.195.0.dist-info/entry_points.txt,sha256=a_e0faeSqyUCVZd0MqljQ2oaHHdlsz6g9sU_bMqi5zQ,49
188
+ orionis-0.195.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
189
+ orionis-0.195.0.dist-info/RECORD,,