orionis 0.164.0__py3-none-any.whl → 0.168.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.164.0"
8
+ VERSION = "0.168.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -137,7 +137,13 @@ class Application(metaclass=SingletonMeta):
137
137
  self._loadCommands()
138
138
 
139
139
  # Boot service providers
140
- asyncio.run(self._bootServiceProviders())
140
+ try:
141
+ loop = asyncio.get_running_loop()
142
+ loop.run_until_complete(self._bootServiceProviders())
143
+ except RuntimeError:
144
+ loop = asyncio.new_event_loop()
145
+ asyncio.set_event_loop(loop)
146
+ loop.run_until_complete(self._bootServiceProviders())
141
147
 
142
148
  # Change the application status to booted
143
149
  Application.boot()
@@ -65,7 +65,6 @@ class Container(IContainer):
65
65
  --------
66
66
  >>> container.bind(MyService, MyServiceImplementation, "singleton")
67
67
  """
68
-
69
68
  if lifetime not in [member.value for member in Lifetime]:
70
69
  raise OrionisContainerValueError(f"Invalid lifetime type '{lifetime}'.")
71
70
 
@@ -401,7 +400,6 @@ class Container(IContainer):
401
400
  --------
402
401
  >>> service = await container.make(MyService)
403
402
  """
404
-
405
403
  if abstract_or_alias in self._aliases_services:
406
404
  abstract_or_alias = self._aliases_services[abstract_or_alias]
407
405
 
@@ -432,7 +430,6 @@ class Container(IContainer):
432
430
 
433
431
  raise OrionisContainerException(f"No binding found for '{abstract_or_alias}' in the container.")
434
432
 
435
-
436
433
  async def _resolve(self, concrete: Callable[..., Any], resolving: Optional[Deque[Type]] = None) -> Any:
437
434
  """
438
435
  Asynchronous method to resolve dependencies recursively and instantiate a class.
@@ -458,7 +455,6 @@ class Container(IContainer):
458
455
  --------
459
456
  >>> instance = await container._resolve(MyClass)
460
457
  """
461
-
462
458
  if resolving is None:
463
459
  resolving = deque()
464
460
 
@@ -516,7 +512,6 @@ class Container(IContainer):
516
512
  except Exception as e:
517
513
  raise OrionisContainerException(f"Failed to instantiate {concrete}: {str(e)}")
518
514
 
519
-
520
515
  async def _resolve_dependency(self, dep_type: Any, resolving: Optional[Deque[Type]] = None) -> Any:
521
516
  """
522
517
  Asynchronously resolves a dependency by instantiating or retrieving it from the container.
@@ -542,7 +537,6 @@ class Container(IContainer):
542
537
  --------
543
538
  >>> dependency = await container._resolve_dependency(MyDependency)
544
539
  """
545
-
546
540
  if resolving is None:
547
541
  resolving = deque()
548
542
 
@@ -552,4 +546,4 @@ class Container(IContainer):
552
546
  else:
553
547
  return await self._resolve(dep_type, resolving)
554
548
 
555
- raise OrionisContainerException(f"Cannot resolve dependency of type {dep_type}")
549
+ raise OrionisContainerException(f"Cannot resolve dependency of type {dep_type}")
@@ -4,7 +4,7 @@ from orionis.luminate.container.container import Container
4
4
  class IServiceProvider(ABC):
5
5
 
6
6
  @abstractmethod
7
- async def register(self, container: Container) -> None:
7
+ def register(self, container: Container) -> None:
8
8
  """
9
9
  Registers services or bindings into the given container.
10
10
 
@@ -4,11 +4,11 @@ from orionis.luminate.services.commands.reactor_commands_service import ReactorC
4
4
 
5
5
  class ReactorCommandsServiceProvider(ServiceProvider):
6
6
 
7
- async def register(self) -> None:
7
+ def register(self) -> None:
8
8
  """
9
9
  Registers services or bindings into the given container.
10
10
  """
11
- await self.app.singleton(IReactorCommandsService, ReactorCommandsService)
11
+ self.app.singleton(IReactorCommandsService, ReactorCommandsService)
12
12
 
13
13
  async def boot(self) -> None:
14
14
  """
@@ -4,8 +4,8 @@ from orionis.luminate.services.commands.scheduler_service import ScheduleService
4
4
 
5
5
  class ScheduleServiceProvider(ServiceProvider):
6
6
 
7
- async def register(self) -> None:
7
+ def register(self) -> None:
8
8
  """
9
9
  Registers services or bindings into the given container.
10
10
  """
11
- await self.app.scoped(IScheduleService, ScheduleService)
11
+ self.app.scoped(IScheduleService, ScheduleService)
@@ -4,8 +4,8 @@ from orionis.luminate.services.config.config_service import ConfigService
4
4
 
5
5
  class ConfigServiceProvider(ServiceProvider):
6
6
 
7
- async def register(self) -> None:
7
+ def register(self) -> None:
8
8
  """
9
9
  Registers services or bindings into the given container.
10
10
  """
11
- await self.app.scoped(IConfigService, ConfigService)
11
+ self.app.scoped(IConfigService, ConfigService)
@@ -5,11 +5,11 @@ from orionis.luminate.services.files.path_resolver_service import PathResolverSe
5
5
 
6
6
  class EnvironmentServiceProvider(ServiceProvider):
7
7
 
8
- async def register(self) -> None:
8
+ def register(self) -> None:
9
9
  """
10
10
  Registers services or bindings into the given container.
11
11
  """
12
- await self.app.singleton(IEnvironmentService, EnvironmentService)
12
+ self.app.singleton(IEnvironmentService, EnvironmentService)
13
13
 
14
14
  async def boot(self) -> None:
15
15
  """
@@ -4,11 +4,11 @@ from orionis.luminate.services.files.path_resolver_service import PathResolverSe
4
4
 
5
5
  class PathResolverProvider(ServiceProvider):
6
6
 
7
- async def register(self) -> None:
7
+ def register(self) -> None:
8
8
  """
9
9
  Registers services or bindings into the given container.
10
10
  """
11
- await self.app.singleton(IPathResolverService, PathResolverService)
11
+ self.app.singleton(IPathResolverService, PathResolverService)
12
12
 
13
13
  async def boot(self) -> None:
14
14
  """
@@ -22,7 +22,7 @@ class ServiceProvider(IServiceProvider):
22
22
  """
23
23
  self.app = app
24
24
 
25
- async def register(self) -> None:
25
+ def register(self) -> None:
26
26
  """
27
27
  Register services in the container.
28
28
 
@@ -36,7 +36,7 @@ class ServiceProvider(IServiceProvider):
36
36
  """
37
37
  raise NotImplementedError("This method should be overridden in the subclass")
38
38
 
39
- async def boot(self) -> None:
39
+ def boot(self) -> None:
40
40
  """
41
41
  Boot services in the container.
42
42
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: orionis
3
- Version: 0.164.0
3
+ Version: 0.168.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=mC5J_jTpYU0Wcv8FaqwN1JoNXxtENXoOvGNP9HSeLP0,1387
3
+ orionis/framework.py,sha256=oBhBclhQabjsBOi30atfuQGieOOfDyJklfOtYrUzpm8,1387
4
4
  orionis/installer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  orionis/installer/manager.py,sha256=SiypGJ2YiFeWyK_4drkheHUd42oS2CH63PNuxiw6Cps,3139
6
6
  orionis/installer/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -12,7 +12,7 @@ orionis/installer/output/output.py,sha256=0ZawkGxSHEYFSElbolQD5V0VjzmQHqRQ6_H7RB
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=cDfTYKnicORxxnJrdkd9YyurRcb4Uw2Q9S-rS3YJvZg,8132
15
+ orionis/luminate/application.py,sha256=aNJPcQX-eupgGmBXsA7k0wZkXLBjC-jr08PYrZP34EU,8393
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
@@ -44,7 +44,7 @@ orionis/luminate/console/output/executor.py,sha256=91722rNiAsKpuq5QYiI7Aqw_7ccmn
44
44
  orionis/luminate/console/output/progress_bar.py,sha256=ZiPGcUaN3EINeLRKgLGtS1GAb1XWlCDx7wFQ7Ff0hqY,3096
45
45
  orionis/luminate/console/output/styles.py,sha256=2e1_FJdNpKaVqmdlCx-udzTleH_6uEFE9_TjH7T1ZUk,3696
46
46
  orionis/luminate/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
- orionis/luminate/container/container.py,sha256=mnshEwdYfnHLypL2G-UQAMmvvWP3RhRBVIJipFPmCOc,18641
47
+ orionis/luminate/container/container.py,sha256=SL8QP2upb5fNm5XCCcWTSLpnDTiQgy3CgD6oPjGRC6U,18627
48
48
  orionis/luminate/container/container_integrity.py,sha256=lFQ41IN_3Z0SbtJzZ_9jewoaUI4xlsBEFXPfn-p82uI,7976
49
49
  orionis/luminate/container/exception.py,sha256=ap1SqYEjQEEHXJJTNmL7V1jrmRjgT5_7geZ95MYkhMA,1691
50
50
  orionis/luminate/container/lifetimes.py,sha256=2lbdiV7R2WlJf1cLD6eBxLnJud_lZvX1IhQH2Djy3Ww,375
@@ -91,7 +91,7 @@ orionis/luminate/contracts/foundation/environment/environment_bootstrapper.py,sh
91
91
  orionis/luminate/contracts/foundation/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
92
92
  orionis/luminate/contracts/foundation/providers/service_providers_bootstrapper.py,sha256=DTXjjZ8RfpLZrSMe6bNlEAHUPepTtS3odgas51w3ZKw,1567
93
93
  orionis/luminate/contracts/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
94
- orionis/luminate/contracts/providers/service_provider.py,sha256=HxVwF2wjvGCfgtLHEIuCyuTMThux48wBvWnO3Ue6x7g,423
94
+ orionis/luminate/contracts/providers/service_provider.py,sha256=UTnLexdDMxRq5fFqKNpq_wUmefersOUdkdoO_2qD0ww,417
95
95
  orionis/luminate/contracts/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
96
96
  orionis/luminate/contracts/services/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
97
97
  orionis/luminate/contracts/services/commands/reactor_commands_service.py,sha256=msIOfwOYASFNuS4shhwsnukPH5_XnuxNBHW9f6q-Lqo,795
@@ -137,16 +137,16 @@ orionis/luminate/foundation/providers/service_providers_bootstrapper.py,sha256=l
137
137
  orionis/luminate/patterns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
138
138
  orionis/luminate/patterns/singleton.py,sha256=b3U0nubKSQWyal5wTXADVPtOztkaTk-M8Zwy-bje1L0,1425
139
139
  orionis/luminate/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
140
- orionis/luminate/providers/service_provider.py,sha256=eKkgd1uDEVV5kaqLwb7HsLNeekXiG5_aPTWQI0QXUQ4,1483
140
+ orionis/luminate/providers/service_provider.py,sha256=dENh4rs9LRSx0gDiWu6cE3-O3Rl5v06JPkA0mYDwYt8,1471
141
141
  orionis/luminate/providers/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
142
- orionis/luminate/providers/commands/reactor_commands_service_provider.py,sha256=Qp5-jSKw2GlAuCaAzpbVqit7ahgtjpYFFrz8IJlE3sE,840
143
- orionis/luminate/providers/commands/scheduler_provider.py,sha256=P2hWF4UOLbCec9uPUUCYG9-0XlRtZ8oLQXXq3nGV8Xc,497
142
+ orionis/luminate/providers/commands/reactor_commands_service_provider.py,sha256=32bGJ35IsDarofSqvNE1WWfpHL_dCyoGpABaLeRWHN0,828
143
+ orionis/luminate/providers/commands/scheduler_provider.py,sha256=7Pq6V58UcJrQvhSDgNrQ6Z4KTO6_Jzp6EoP8oqPLsQg,485
144
144
  orionis/luminate/providers/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
145
- orionis/luminate/providers/config/config_service_provider.py,sha256=VCLZ17ZN4-LqV7GpIs0h5wHQk2NptNyWqyA3jabTznQ,478
145
+ orionis/luminate/providers/config/config_service_provider.py,sha256=UWozQ84StJjn3x2gjqslLAu5P1GqgPzSvj-91hgfapk,466
146
146
  orionis/luminate/providers/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
147
- orionis/luminate/providers/environment/environment__service_provider.py,sha256=Qr5OGueoRc991oKoHvXpYS0B9NiH-RKby1YmKNo_Y5U,899
147
+ orionis/luminate/providers/environment/environment__service_provider.py,sha256=Mk3CzEPlANZyuvfwBlMJi3eI91MU4wkfvUme-GEwDfg,887
148
148
  orionis/luminate/providers/files/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
149
- orionis/luminate/providers/files/paths_provider.py,sha256=lY5eEkWOfASMIZjWjPg8M8bj9jkTirH4Jm9qDr6e6vE,803
149
+ orionis/luminate/providers/files/paths_provider.py,sha256=S9wm9r2jaMwFcz3qpOTHKCwvqccqaU40xyAiBOhbZTs,791
150
150
  orionis/luminate/providers/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
151
151
  orionis/luminate/providers/log/log_service_provider.py,sha256=4mXkd9kTKW8dsqe6ScbEDO7b6GsFgAfu9vFJNjECZlw,740
152
152
  orionis/luminate/services/__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.164.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
185
- orionis-0.164.0.dist-info/METADATA,sha256=vds82DqQGRqwNOmFfk5Pza8YMOB0K4zBmYPtu8VZ6Us,2970
186
- orionis-0.164.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
187
- orionis-0.164.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
188
- orionis-0.164.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
189
- orionis-0.164.0.dist-info/RECORD,,
184
+ orionis-0.168.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
185
+ orionis-0.168.0.dist-info/METADATA,sha256=h5zJyRmN4GfclUx6Wje1lkbUEjAI_jg51GUEyF1eYM4,2970
186
+ orionis-0.168.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
187
+ orionis-0.168.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
188
+ orionis-0.168.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
189
+ orionis-0.168.0.dist-info/RECORD,,