orionis 0.189.0__py3-none-any.whl → 0.191.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.191.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,8 @@
1
1
  from orionis.luminate.contracts.services.commands.reactor_commands_service import IReactorCommandsService
2
+ from orionis.luminate.contracts.services.log.log_service import ILogguerService
2
3
  from orionis.luminate.providers.service_provider import ServiceProvider
3
4
  from orionis.luminate.services.commands.reactor_commands_service import ReactorCommandsService
5
+ from orionis.luminate.services.log.log_service import LogguerService
4
6
 
5
7
  class ReactorCommandsServiceProvider(ServiceProvider):
6
8
 
@@ -8,6 +10,9 @@ class ReactorCommandsServiceProvider(ServiceProvider):
8
10
  """
9
11
  Registers services or bindings into the given container.
10
12
  """
13
+ if not self.app.bound(ILogguerService):
14
+ self.app.singleton(ILogguerService, LogguerService)
15
+
11
16
  self.app.singleton(IReactorCommandsService, ReactorCommandsService)
12
17
 
13
18
  async def boot(self) -> None:
@@ -1,5 +1,7 @@
1
+ from orionis.luminate.contracts.services.config.config_service import IConfigService
1
2
  from orionis.luminate.contracts.services.log.log_service import ILogguerService
2
3
  from orionis.luminate.providers.service_provider import ServiceProvider
4
+ from orionis.luminate.services.config.config_service import ConfigService
3
5
  from orionis.luminate.services.log.log_service import LogguerService
4
6
 
5
7
  class LogServiceProvider(ServiceProvider):
@@ -8,6 +10,9 @@ class LogServiceProvider(ServiceProvider):
8
10
  """
9
11
  Registers services or bindings into the given container.
10
12
  """
13
+ if not self.app.bound(IConfigService):
14
+ self.app.scoped(IConfigService, ConfigService)
15
+
11
16
  self.app.singleton(ILogguerService, LogguerService)
12
17
 
13
18
  async def boot(self) -> None:
@@ -1,5 +1,5 @@
1
+ from orionis.luminate.contracts.container.container import IContainer
1
2
  from orionis.luminate.contracts.providers.service_provider import IServiceProvider
2
- from orionis.luminate.container.container import Container
3
3
 
4
4
  class ServiceProvider(IServiceProvider):
5
5
  """
@@ -11,7 +11,7 @@ class ServiceProvider(IServiceProvider):
11
11
  The container instance to be used by the service provider.
12
12
  """
13
13
 
14
- def __init__(self, app : Container) -> None:
14
+ def __init__(self, app : IContainer) -> None:
15
15
  """
16
16
  Initialize the service provider with the given container.
17
17
 
@@ -7,8 +7,8 @@ from orionis.luminate.console.output.console import Console
7
7
  from orionis.luminate.console.output.executor import Executor
8
8
  from orionis.luminate.console.parser import Parser
9
9
  from orionis.luminate.contracts.application import IApplication
10
+ from orionis.luminate.contracts.services.log.log_service import ILogguerService
10
11
  from orionis.luminate.facades.app_facade import app
11
- from orionis.luminate.facades.log.log_facade import Log
12
12
 
13
13
  class ReactorCommandsService:
14
14
  """
@@ -20,7 +20,7 @@ class ReactorCommandsService:
20
20
  - Managing execution timing and error handling.
21
21
  """
22
22
 
23
- def __init__(self, command_filter: CommandFilter, log: Log, executor: Executor, console: Console, app : IApplication) -> None:
23
+ def __init__(self, command_filter: CommandFilter, log: ILogguerService, executor: Executor, console: Console, app : IApplication) -> None:
24
24
  """
25
25
  Initializes the ReactorCommandsService instance.
26
26
 
@@ -4,7 +4,7 @@ from pathlib import Path
4
4
  import re
5
5
  from datetime import datetime
6
6
  from logging.handlers import RotatingFileHandler, TimedRotatingFileHandler
7
- from orionis.luminate.services.config.config_service import ConfigService
7
+ from orionis.luminate.contracts.services.config.config_service import IConfigService
8
8
 
9
9
  class LogguerService:
10
10
  """
@@ -36,7 +36,7 @@ class LogguerService:
36
36
  Logs a debug message.
37
37
  """
38
38
 
39
- def __init__(self, config_service : ConfigService):
39
+ def __init__(self, config_service : IConfigService):
40
40
  """
41
41
  Initializes the logger with the specified path, log level, and filename.
42
42
 
@@ -1,4 +1,5 @@
1
1
  import asyncio
2
+ import logging
2
3
  from typing import Any, Coroutine, TypeVar
3
4
 
4
5
  T = TypeVar("T")
@@ -26,6 +27,8 @@ class AsyncExecutor:
26
27
  Exception
27
28
  If the coroutine execution fails.
28
29
  """
30
+ logging.getLogger('asyncio').setLevel(logging.WARNING)
31
+
29
32
  try:
30
33
  loop = asyncio.get_running_loop()
31
34
  except RuntimeError:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: orionis
3
- Version: 0.189.0
3
+ Version: 0.191.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=H1NRbmkz1fQ_uD3Jqjs-eoGhpUuV-5HQTrigjLk7PNA,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
@@ -135,9 +136,9 @@ orionis/luminate/foundation/providers/service_providers_bootstrapper.py,sha256=l
135
136
  orionis/luminate/patterns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
136
137
  orionis/luminate/patterns/singleton.py,sha256=b3U0nubKSQWyal5wTXADVPtOztkaTk-M8Zwy-bje1L0,1425
137
138
  orionis/luminate/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
138
- orionis/luminate/providers/service_provider.py,sha256=5nHD4qzRnpHtAwFEh5h2mSpTiZdvWgxNNVWj8FIxnVk,1123
139
+ orionis/luminate/providers/service_provider.py,sha256=QG5TXP9oXsCdUhnMyCBEn0G_CnUJQD_u7wd_4LXE9yc,1135
139
140
  orionis/luminate/providers/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
140
- orionis/luminate/providers/commands/reactor_commands_service_provider.py,sha256=32bGJ35IsDarofSqvNE1WWfpHL_dCyoGpABaLeRWHN0,828
141
+ orionis/luminate/providers/commands/reactor_commands_service_provider.py,sha256=PsS9ymVpm6YwONlag8hZT6Pdgh7avWaH7jCIXrW7dgQ,1095
141
142
  orionis/luminate/providers/commands/scheduler_provider.py,sha256=7Pq6V58UcJrQvhSDgNrQ6Z4KTO6_Jzp6EoP8oqPLsQg,485
142
143
  orionis/luminate/providers/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
143
144
  orionis/luminate/providers/config/config_service_provider.py,sha256=UWozQ84StJjn3x2gjqslLAu5P1GqgPzSvj-91hgfapk,466
@@ -146,10 +147,10 @@ orionis/luminate/providers/environment/environment__service_provider.py,sha256=M
146
147
  orionis/luminate/providers/files/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
147
148
  orionis/luminate/providers/files/paths_provider.py,sha256=S9wm9r2jaMwFcz3qpOTHKCwvqccqaU40xyAiBOhbZTs,791
148
149
  orionis/luminate/providers/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
149
- orionis/luminate/providers/log/log_service_provider.py,sha256=4mXkd9kTKW8dsqe6ScbEDO7b6GsFgAfu9vFJNjECZlw,740
150
+ orionis/luminate/providers/log/log_service_provider.py,sha256=c4pTAbeBtLll6LzPPphgIM1XReUfj-E8Hry5R8i1SHI,1011
150
151
  orionis/luminate/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
151
152
  orionis/luminate/services/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
152
- orionis/luminate/services/commands/reactor_commands_service.py,sha256=W021KVkIIVVkS16oaxrC5Vz2qR9Ji_pbvoNaLBFJR1E,6214
153
+ orionis/luminate/services/commands/reactor_commands_service.py,sha256=oca_xPEQ_dyJKsYfUgsNK3WpMR-f0JabNE8C5pD8hoc,6250
153
154
  orionis/luminate/services/commands/scheduler_service.py,sha256=bOovnY83aZPfDz7XhGv4mQXVV116l_9UeaCstA89i_8,22474
154
155
  orionis/luminate/services/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
155
156
  orionis/luminate/services/config/config_service.py,sha256=RKZ194_0RAEkRFSm3OPoDDdme0_wyBZNLaEQhIVdbYk,2114
@@ -158,8 +159,8 @@ orionis/luminate/services/environment/environment_service.py,sha256=GdrXWmOK2lWp
158
159
  orionis/luminate/services/files/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
159
160
  orionis/luminate/services/files/path_resolver_service.py,sha256=gCGVLtdXGuEIE6I8tm6JEB84HS1Fa5rk2whO2R6u8Wc,1698
160
161
  orionis/luminate/services/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
161
- orionis/luminate/services/log/log_service.py,sha256=7KZ9i5RGquUqRADTa7T61v4kTu_qjDOVyaoGvm_51f0,8291
162
- orionis/luminate/support/asyn_run.py,sha256=daqoV7eRb_6MWMq_ALVlbO20vfXedBrvKDYV-LqGyiI,1032
162
+ orionis/luminate/services/log/log_service.py,sha256=jrCrKz7Uj6n_ri-v5A4YOILQGUQ9MAmrlSizbbOvKhI,8303
163
+ orionis/luminate/support/asyn_run.py,sha256=MTwVGNEnKRqD582oZRpUDQ141-hXoO5wc4NSdC7ct0E,1114
163
164
  orionis/luminate/support/dot_dict.py,sha256=FVHfBuAGTTVMjNG01Fix645fRNKKUMmNx61pYkxPL5c,1253
164
165
  orionis/luminate/support/exception_to_dict.py,sha256=OV3vWZ6Dlh3EnFurR_7zhR3mfXDZg-UFbMsfs4tNnLA,2105
165
166
  orionis/luminate/support/reflection.py,sha256=TbWZ_cer0PXrPlwCYFbUJRymlzYxXT0E4C5XCsSc3mw,11951
@@ -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.191.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
185
+ orionis-0.191.0.dist-info/METADATA,sha256=ziRmoaBKcyREp1MEIKe6xVM2auLYWM-ENCNCAbPrI-g,3003
186
+ orionis-0.191.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
187
+ orionis-0.191.0.dist-info/entry_points.txt,sha256=a_e0faeSqyUCVZd0MqljQ2oaHHdlsz6g9sU_bMqi5zQ,49
188
+ orionis-0.191.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
189
+ orionis-0.191.0.dist-info/RECORD,,