orionis 0.324.0__py3-none-any.whl → 0.325.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/container/facades/facade.py +32 -12
- orionis/metadata/framework.py +1 -1
- {orionis-0.324.0.dist-info → orionis-0.325.0.dist-info}/METADATA +1 -1
- {orionis-0.324.0.dist-info → orionis-0.325.0.dist-info}/RECORD +8 -8
- {orionis-0.324.0.dist-info → orionis-0.325.0.dist-info}/WHEEL +0 -0
- {orionis-0.324.0.dist-info → orionis-0.325.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.324.0.dist-info → orionis-0.325.0.dist-info}/top_level.txt +0 -0
- {orionis-0.324.0.dist-info → orionis-0.325.0.dist-info}/zip-safe +0 -0
@@ -22,27 +22,47 @@ class FacadeMeta(type):
|
|
22
22
|
|
23
23
|
class Facade(metaclass=FacadeMeta):
|
24
24
|
|
25
|
+
# Container instance to resolve services
|
25
26
|
_container = Container()
|
26
27
|
|
27
28
|
@classmethod
|
28
29
|
def getFacadeAccessor(cls) -> str:
|
29
30
|
"""
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
Returns
|
34
|
-
|
31
|
+
Get the name of the service to be resolved from the container.
|
32
|
+
This method must be overridden by subclasses to return the name of the service
|
33
|
+
to be resolved. If not overridden, it raises NotImplementedError.
|
34
|
+
Returns
|
35
|
+
-------
|
36
|
+
str
|
37
|
+
The service name to be resolved from the container.
|
38
|
+
Raises
|
39
|
+
------
|
40
|
+
NotImplementedError
|
41
|
+
If the method is not overridden by a subclass.
|
35
42
|
"""
|
36
43
|
raise NotImplementedError(f"Class {cls.__name__} must define the getFacadeAccessor method")
|
37
44
|
|
38
45
|
@classmethod
|
39
|
-
def resolve(cls) -> Any:
|
46
|
+
def resolve(cls, *args, **kwargs) -> Any:
|
40
47
|
"""
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
48
|
+
This method retrieves a service instance from the container using the facade accessor.
|
49
|
+
If the service is not bound in the container, a RuntimeError is raised.
|
50
|
+
Parameters
|
51
|
+
----------
|
52
|
+
*args
|
53
|
+
Positional arguments to pass to the service constructor.
|
54
|
+
**kwargs
|
55
|
+
Keyword arguments to pass to the service constructor.
|
56
|
+
Returns
|
57
|
+
-------
|
58
|
+
Any
|
59
|
+
The resolved service instance.
|
60
|
+
Raises
|
61
|
+
------
|
62
|
+
RuntimeError
|
63
|
+
If the service is not bound in the container.
|
64
|
+
Notes
|
65
|
+
-----
|
46
66
|
"""
|
47
67
|
|
48
68
|
# Get the service name from the facade accessor
|
@@ -56,5 +76,5 @@ class Facade(metaclass=FacadeMeta):
|
|
56
76
|
)
|
57
77
|
|
58
78
|
# Resolve the service instance from the container
|
59
|
-
service_instance = cls._container.make(service_name)
|
79
|
+
service_instance = cls._container.make(service_name, *args, **kwargs)
|
60
80
|
return service_instance
|
orionis/metadata/framework.py
CHANGED
@@ -141,7 +141,7 @@ orionis/container/exceptions/container_exception.py,sha256=goTDEwC70xTMD2qppN8KV
|
|
141
141
|
orionis/container/exceptions/type_error_exception.py,sha256=cYuvoXVOgRYj3tZPfK341aUERkf33-buOiI2eXxcrAw,470
|
142
142
|
orionis/container/exceptions/value_exception.py,sha256=hjY0YEusoL3DurME1ornxvIv1wyGaf6tBggLFlGHblo,472
|
143
143
|
orionis/container/facades/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
144
|
-
orionis/container/facades/facade.py,sha256=
|
144
|
+
orionis/container/facades/facade.py,sha256=jY0Np_-fdUofq9cRLTZCYHuE-_Zj-hAhvsg8mhWCaM8,2771
|
145
145
|
orionis/container/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
146
146
|
orionis/container/validators/implements.py,sha256=iSoDxxTalQKhyKjvsojFlkROhBFvAjvJxRvPJlmGrSg,2843
|
147
147
|
orionis/container/validators/is_abstract_class.py,sha256=Q-Lqyrrps6oj2XWI0KFRp-hDZf4_sgbZlEbfBXj5XT4,1169
|
@@ -243,7 +243,7 @@ orionis/foundation/contracts/config.py,sha256=Rpz6U6t8OXHO9JJKSTnCimytXE-tfCB-1i
|
|
243
243
|
orionis/foundation/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
244
244
|
orionis/foundation/exceptions/integrity.py,sha256=mc4pL1UMoYRHEmphnpW2oGk5URhu7DJRREyzHaV-cs8,472
|
245
245
|
orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
246
|
-
orionis/metadata/framework.py,sha256=
|
246
|
+
orionis/metadata/framework.py,sha256=IhPmn8wBfMaPIOA6TEFEcnsrQ6JRJkYY7ET01P4bSBU,4960
|
247
247
|
orionis/metadata/package.py,sha256=tqLfBRo-w1j_GN4xvzUNFyweWYFS-qhSgAEc-AmCH1M,5452
|
248
248
|
orionis/patterns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
249
249
|
orionis/patterns/singleton/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -355,7 +355,7 @@ orionis/test/suite/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
355
355
|
orionis/test/suite/test_unit.py,sha256=MWgW8dRCRyT1XZ5LsbXQ7-KVPReasoXwzEEL1EWWfE4,52190
|
356
356
|
orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
357
357
|
orionis/test/view/render.py,sha256=jXZkbITBknbUwm_mD8bcTiwLDvsFkrO9qrf0ZgPwqxc,4903
|
358
|
-
orionis-0.
|
358
|
+
orionis-0.325.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
|
359
359
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
360
360
|
tests/example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
361
361
|
tests/example/test_example.py,sha256=kvWgiW3ADEZf718dGsMPtDh_rmOSx1ypEInKm7_6ZPQ,601
|
@@ -456,8 +456,8 @@ tests/support/wrapper/test_services_wrapper_docdict.py,sha256=yeVwl-VcwkWSQYyxZu
|
|
456
456
|
tests/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
457
457
|
tests/testing/test_testing_result.py,sha256=MrGK3ZimedL0b5Ydu69Dg8Iul017AzLTm7VPxpXlpfU,4315
|
458
458
|
tests/testing/test_testing_unit.py,sha256=DjLBtvVn8B1KlVJNNkstBT8_csA1yeaMqnGrbanN_J4,7438
|
459
|
-
orionis-0.
|
460
|
-
orionis-0.
|
461
|
-
orionis-0.
|
462
|
-
orionis-0.
|
463
|
-
orionis-0.
|
459
|
+
orionis-0.325.0.dist-info/METADATA,sha256=I_YFjyuy8QRXf_lRW03geTqwLoN1QgHe-LXTm2_qk3Q,4772
|
460
|
+
orionis-0.325.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
461
|
+
orionis-0.325.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
|
462
|
+
orionis-0.325.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
463
|
+
orionis-0.325.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|