orionis 0.318.0__py3-none-any.whl → 0.320.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/container.py +503 -352
- orionis/container/contracts/container.py +202 -0
- orionis/container/resolver.py +28 -0
- orionis/container/validators/__init__.py +0 -0
- orionis/container/validators/implements.py +67 -0
- orionis/container/validators/is_abstract_class.py +34 -0
- orionis/container/validators/is_callable.py +30 -0
- orionis/container/validators/is_concrete_class.py +34 -0
- orionis/container/validators/is_instance.py +32 -0
- orionis/container/validators/is_not_subclass.py +32 -0
- orionis/container/validators/is_subclass.py +32 -0
- orionis/container/validators/is_valid_alias.py +37 -0
- orionis/metadata/framework.py +1 -1
- orionis/services/introspection/callables/reflection_callable.py +14 -0
- orionis/services/introspection/concretes/reflection_concrete.py +11 -0
- {orionis-0.318.0.dist-info → orionis-0.320.0.dist-info}/METADATA +1 -1
- {orionis-0.318.0.dist-info → orionis-0.320.0.dist-info}/RECORD +21 -10
- {orionis-0.318.0.dist-info → orionis-0.320.0.dist-info}/WHEEL +0 -0
- {orionis-0.318.0.dist-info → orionis-0.320.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.318.0.dist-info → orionis-0.320.0.dist-info}/top_level.txt +0 -0
- {orionis-0.318.0.dist-info → orionis-0.320.0.dist-info}/zip-safe +0 -0
@@ -0,0 +1,202 @@
|
|
1
|
+
from abc import ABC, abstractmethod
|
2
|
+
from typing import Any, Callable
|
3
|
+
from orionis.container.enums.lifetimes import Lifetime
|
4
|
+
|
5
|
+
class IContainer(ABC):
|
6
|
+
"""
|
7
|
+
IContainer is an interface that defines the structure for a dependency injection container.
|
8
|
+
It provides methods for registering and resolving services with different lifetimes.
|
9
|
+
"""
|
10
|
+
|
11
|
+
@abstractmethod
|
12
|
+
def singleton(
|
13
|
+
self,
|
14
|
+
abstract: Callable[..., Any],
|
15
|
+
concrete: Callable[..., Any],
|
16
|
+
*,
|
17
|
+
alias: str = None,
|
18
|
+
enforce_decoupling: bool = False
|
19
|
+
) -> bool:
|
20
|
+
"""
|
21
|
+
Register a service as a singleton.
|
22
|
+
|
23
|
+
Parameters
|
24
|
+
----------
|
25
|
+
abstract : Callable[..., Any]
|
26
|
+
The abstract base type or interface to be bound.
|
27
|
+
concrete : Callable[..., Any]
|
28
|
+
The concrete implementation to associate with the abstract type.
|
29
|
+
alias : str, optional
|
30
|
+
An alternative name to register the service under.
|
31
|
+
enforce_decoupling : bool, optional
|
32
|
+
Whether to enforce that concrete is not a subclass of abstract.
|
33
|
+
|
34
|
+
Returns
|
35
|
+
-------
|
36
|
+
bool
|
37
|
+
True if the service was registered successfully.
|
38
|
+
"""
|
39
|
+
pass
|
40
|
+
|
41
|
+
@abstractmethod
|
42
|
+
def transient(
|
43
|
+
self,
|
44
|
+
abstract: Callable[..., Any],
|
45
|
+
concrete: Callable[..., Any],
|
46
|
+
*,
|
47
|
+
alias: str = None,
|
48
|
+
enforce_decoupling: bool = False
|
49
|
+
) -> bool:
|
50
|
+
"""
|
51
|
+
Register a service as transient.
|
52
|
+
|
53
|
+
Parameters
|
54
|
+
----------
|
55
|
+
abstract : Callable[..., Any]
|
56
|
+
The abstract base type or interface to be bound.
|
57
|
+
concrete : Callable[..., Any]
|
58
|
+
The concrete implementation to associate with the abstract type.
|
59
|
+
alias : str, optional
|
60
|
+
An alternative name to register the service under.
|
61
|
+
enforce_decoupling : bool, optional
|
62
|
+
Whether to enforce that concrete is not a subclass of abstract.
|
63
|
+
|
64
|
+
Returns
|
65
|
+
-------
|
66
|
+
bool
|
67
|
+
True if the service was registered successfully.
|
68
|
+
"""
|
69
|
+
pass
|
70
|
+
|
71
|
+
@abstractmethod
|
72
|
+
def scoped(
|
73
|
+
self,
|
74
|
+
abstract: Callable[..., Any],
|
75
|
+
concrete: Callable[..., Any],
|
76
|
+
*,
|
77
|
+
alias: str = None,
|
78
|
+
enforce_decoupling: bool = False
|
79
|
+
) -> bool:
|
80
|
+
"""
|
81
|
+
Register a service as scoped.
|
82
|
+
|
83
|
+
Parameters
|
84
|
+
----------
|
85
|
+
abstract : Callable[..., Any]
|
86
|
+
The abstract base type or interface to be bound.
|
87
|
+
concrete : Callable[..., Any]
|
88
|
+
The concrete implementation to associate with the abstract type.
|
89
|
+
alias : str, optional
|
90
|
+
An alternative name to register the service under.
|
91
|
+
enforce_decoupling : bool, optional
|
92
|
+
Whether to enforce that concrete is not a subclass of abstract.
|
93
|
+
|
94
|
+
Returns
|
95
|
+
-------
|
96
|
+
bool
|
97
|
+
True if the service was registered successfully.
|
98
|
+
"""
|
99
|
+
pass
|
100
|
+
|
101
|
+
@abstractmethod
|
102
|
+
def instance(
|
103
|
+
self,
|
104
|
+
abstract: Callable[..., Any],
|
105
|
+
instance: Any,
|
106
|
+
*,
|
107
|
+
alias: str = None,
|
108
|
+
enforce_decoupling: bool = False
|
109
|
+
) -> bool:
|
110
|
+
"""
|
111
|
+
Register an instance of a service.
|
112
|
+
|
113
|
+
Parameters
|
114
|
+
----------
|
115
|
+
abstract : Callable[..., Any]
|
116
|
+
The abstract class or interface to associate with the instance.
|
117
|
+
instance : Any
|
118
|
+
The concrete instance to register.
|
119
|
+
alias : str, optional
|
120
|
+
An optional alias to register the instance under.
|
121
|
+
enforce_decoupling : bool, optional
|
122
|
+
Whether to enforce that instance's class is not a subclass of abstract.
|
123
|
+
|
124
|
+
Returns
|
125
|
+
-------
|
126
|
+
bool
|
127
|
+
True if the instance was successfully registered.
|
128
|
+
"""
|
129
|
+
pass
|
130
|
+
|
131
|
+
@abstractmethod
|
132
|
+
def function(
|
133
|
+
self,
|
134
|
+
alias: str,
|
135
|
+
fn: Callable[..., Any],
|
136
|
+
*,
|
137
|
+
lifetime: Lifetime = Lifetime.TRANSIENT
|
138
|
+
) -> bool:
|
139
|
+
"""
|
140
|
+
Register a function as a service.
|
141
|
+
|
142
|
+
Parameters
|
143
|
+
----------
|
144
|
+
alias : str
|
145
|
+
The alias to register the function under.
|
146
|
+
fn : Callable[..., Any]
|
147
|
+
The function or factory to register.
|
148
|
+
lifetime : Lifetime, optional
|
149
|
+
The lifetime of the function registration (default is TRANSIENT).
|
150
|
+
|
151
|
+
Returns
|
152
|
+
-------
|
153
|
+
bool
|
154
|
+
True if the function was registered successfully.
|
155
|
+
"""
|
156
|
+
pass
|
157
|
+
|
158
|
+
@abstractmethod
|
159
|
+
def make(
|
160
|
+
self,
|
161
|
+
abstract_or_alias: Any,
|
162
|
+
*args: tuple,
|
163
|
+
**kwargs: dict
|
164
|
+
) -> Any:
|
165
|
+
"""
|
166
|
+
Resolve a service from the container.
|
167
|
+
|
168
|
+
Parameters
|
169
|
+
----------
|
170
|
+
abstract_or_alias : Any
|
171
|
+
The abstract class, interface, or alias (str) to resolve.
|
172
|
+
*args : tuple
|
173
|
+
Positional arguments to pass to the constructor.
|
174
|
+
**kwargs : dict
|
175
|
+
Keyword arguments to pass to the constructor.
|
176
|
+
|
177
|
+
Returns
|
178
|
+
-------
|
179
|
+
Any
|
180
|
+
An instance of the requested service.
|
181
|
+
"""
|
182
|
+
pass
|
183
|
+
|
184
|
+
@abstractmethod
|
185
|
+
def bound(
|
186
|
+
self,
|
187
|
+
abstract_or_alias: Any
|
188
|
+
) -> bool:
|
189
|
+
"""
|
190
|
+
Check if a service is registered in the container.
|
191
|
+
|
192
|
+
Parameters
|
193
|
+
----------
|
194
|
+
abstract_or_alias : Any
|
195
|
+
The abstract class, interface, or alias (str) to check.
|
196
|
+
|
197
|
+
Returns
|
198
|
+
-------
|
199
|
+
bool
|
200
|
+
True if the service is registered, False otherwise.
|
201
|
+
"""
|
202
|
+
pass
|
@@ -0,0 +1,28 @@
|
|
1
|
+
from orionis.container.contracts.container import IContainer
|
2
|
+
from orionis.container.entities.binding import Binding
|
3
|
+
from orionis.container.enums.lifetimes import Lifetime
|
4
|
+
|
5
|
+
|
6
|
+
class Resolver:
|
7
|
+
"""
|
8
|
+
Resolver class for handling dependency resolution in the container.
|
9
|
+
"""
|
10
|
+
|
11
|
+
def __init__(
|
12
|
+
self,
|
13
|
+
container:IContainer,
|
14
|
+
lifetime:Lifetime
|
15
|
+
):
|
16
|
+
self.container = container
|
17
|
+
self.lifetime = lifetime
|
18
|
+
|
19
|
+
def transient(
|
20
|
+
self,
|
21
|
+
binding:Binding,
|
22
|
+
*args,
|
23
|
+
**kwargs
|
24
|
+
):
|
25
|
+
"""
|
26
|
+
Register a transient service.
|
27
|
+
"""
|
28
|
+
return self.container.transient(service, implementation, **kwargs)
|
File without changes
|
@@ -0,0 +1,67 @@
|
|
1
|
+
from typing import Callable, Any
|
2
|
+
from orionis.services.introspection.reflection import Reflection
|
3
|
+
from orionis.container.exceptions.container_exception import OrionisContainerException
|
4
|
+
|
5
|
+
class _ImplementsAbstractMethods:
|
6
|
+
"""
|
7
|
+
Validator that ensures a concrete class or instance implements all abstract methods of an abstract class.
|
8
|
+
"""
|
9
|
+
|
10
|
+
def __call__(
|
11
|
+
self,
|
12
|
+
*,
|
13
|
+
abstract: Callable[..., Any] = None,
|
14
|
+
concrete: Callable[..., Any] = None,
|
15
|
+
instance: Any = None
|
16
|
+
) -> None:
|
17
|
+
"""
|
18
|
+
Validates that a concrete class or instance implements all abstract methods defined in an abstract class.
|
19
|
+
|
20
|
+
Parameters
|
21
|
+
----------
|
22
|
+
abstract : Callable[..., Any]
|
23
|
+
The abstract base class.
|
24
|
+
concrete : Callable[..., Any], optional
|
25
|
+
The class expected to implement the abstract methods.
|
26
|
+
instance : Any, optional
|
27
|
+
The instance expected to implement the abstract methods.
|
28
|
+
|
29
|
+
Raises
|
30
|
+
------
|
31
|
+
OrionisContainerException
|
32
|
+
If any abstract method is not implemented.
|
33
|
+
"""
|
34
|
+
if abstract is None:
|
35
|
+
raise OrionisContainerException("Abstract class must be provided for implementation check.")
|
36
|
+
|
37
|
+
abstract_methods = getattr(abstract, '__abstractmethods__', set())
|
38
|
+
if not abstract_methods:
|
39
|
+
raise OrionisContainerException(
|
40
|
+
f"The abstract class '{abstract.__name__}' does not define any abstract methods. "
|
41
|
+
"An abstract class must have at least one abstract method."
|
42
|
+
)
|
43
|
+
|
44
|
+
target = concrete if concrete is not None else instance
|
45
|
+
if target is None:
|
46
|
+
raise OrionisContainerException("Either concrete class or instance must be provided for implementation check.")
|
47
|
+
|
48
|
+
target_class = target if Reflection.isClass(target) else target.__class__
|
49
|
+
target_name = target_class.__name__
|
50
|
+
abstract_name = abstract.__name__
|
51
|
+
|
52
|
+
not_implemented = []
|
53
|
+
for method in abstract_methods:
|
54
|
+
# Considera métodos renombrados en clases concretas (_Abstract.m → _Concrete.m)
|
55
|
+
expected_method = str(method).replace(f"_{abstract_name}", f"_{target_name}")
|
56
|
+
if not hasattr(target, expected_method):
|
57
|
+
not_implemented.append(method)
|
58
|
+
|
59
|
+
if not_implemented:
|
60
|
+
formatted = "\n • " + "\n • ".join(not_implemented)
|
61
|
+
raise OrionisContainerException(
|
62
|
+
f"'{target_name}' does not implement the following abstract methods defined in '{abstract_name}':{formatted}\n"
|
63
|
+
"Please ensure that all abstract methods are implemented."
|
64
|
+
)
|
65
|
+
|
66
|
+
# Exported singleton instance
|
67
|
+
ImplementsAbstractMethods = _ImplementsAbstractMethods()
|
@@ -0,0 +1,34 @@
|
|
1
|
+
from typing import Callable, Any
|
2
|
+
from orionis.services.introspection.abstract.reflection_abstract import ReflectionAbstract
|
3
|
+
from orionis.container.exceptions.type_error_exception import OrionisContainerTypeError
|
4
|
+
|
5
|
+
class _IsAbstractClass:
|
6
|
+
"""
|
7
|
+
Validator that ensures a class is an abstract class.
|
8
|
+
"""
|
9
|
+
|
10
|
+
def __call__(self, abstract: Callable[..., Any], lifetime: str) -> None:
|
11
|
+
"""
|
12
|
+
Ensures that the provided class is an abstract class.
|
13
|
+
|
14
|
+
Parameters
|
15
|
+
----------
|
16
|
+
abstract : Callable[..., Any]
|
17
|
+
The class intended to represent the abstract type.
|
18
|
+
lifetime : str
|
19
|
+
A string indicating the service lifetime, used in error messages.
|
20
|
+
|
21
|
+
Raises
|
22
|
+
------
|
23
|
+
OrionisContainerTypeError
|
24
|
+
If the class is not abstract.
|
25
|
+
"""
|
26
|
+
try:
|
27
|
+
ReflectionAbstract.ensureIsAbstractClass(abstract)
|
28
|
+
except Exception as e:
|
29
|
+
raise OrionisContainerTypeError(
|
30
|
+
f"Unexpected error registering {lifetime} service: {e}"
|
31
|
+
) from e
|
32
|
+
|
33
|
+
# Exported singleton instance
|
34
|
+
IsAbstractClass = _IsAbstractClass()
|
@@ -0,0 +1,30 @@
|
|
1
|
+
from typing import Any
|
2
|
+
from orionis.container.exceptions.type_error_exception import OrionisContainerTypeError
|
3
|
+
|
4
|
+
class _IsCallable:
|
5
|
+
"""
|
6
|
+
Validator that checks if a value is callable.
|
7
|
+
Can be used directly like a function: `IsCallable(value)`
|
8
|
+
"""
|
9
|
+
|
10
|
+
def __call__(self, value: Any) -> None:
|
11
|
+
"""
|
12
|
+
Ensures that the provided value is callable.
|
13
|
+
|
14
|
+
Parameters
|
15
|
+
----------
|
16
|
+
value : Any
|
17
|
+
The value to check.
|
18
|
+
|
19
|
+
Raises
|
20
|
+
------
|
21
|
+
OrionisContainerTypeError
|
22
|
+
If the value is not callable.
|
23
|
+
"""
|
24
|
+
if not callable(value):
|
25
|
+
raise OrionisContainerTypeError(
|
26
|
+
f"Expected a callable type, but got {type(value).__name__} instead."
|
27
|
+
)
|
28
|
+
|
29
|
+
# Exported singleton instance
|
30
|
+
IsCallable = _IsCallable()
|
@@ -0,0 +1,34 @@
|
|
1
|
+
from typing import Callable, Any
|
2
|
+
from orionis.services.introspection.concretes.reflection_concrete import ReflectionConcrete
|
3
|
+
from orionis.container.exceptions.type_error_exception import OrionisContainerTypeError
|
4
|
+
|
5
|
+
class _IsConcreteClass:
|
6
|
+
"""
|
7
|
+
Validator that ensures a class is a concrete (non-abstract) class.
|
8
|
+
"""
|
9
|
+
|
10
|
+
def __call__(self, concrete: Callable[..., Any], lifetime: str) -> None:
|
11
|
+
"""
|
12
|
+
Ensures that the provided class is a concrete (non-abstract) class.
|
13
|
+
|
14
|
+
Parameters
|
15
|
+
----------
|
16
|
+
concrete : Callable[..., Any]
|
17
|
+
The class intended to represent the concrete implementation.
|
18
|
+
lifetime : str
|
19
|
+
A string indicating the service lifetime, used in error messages.
|
20
|
+
|
21
|
+
Raises
|
22
|
+
------
|
23
|
+
OrionisContainerTypeError
|
24
|
+
If the class is abstract or invalid.
|
25
|
+
"""
|
26
|
+
try:
|
27
|
+
ReflectionConcrete.ensureIsConcreteClass(concrete)
|
28
|
+
except Exception as e:
|
29
|
+
raise OrionisContainerTypeError(
|
30
|
+
f"Unexpected error registering {lifetime} service: {e}"
|
31
|
+
) from e
|
32
|
+
|
33
|
+
# Exported singleton instance
|
34
|
+
IsConcreteClass = _IsConcreteClass()
|
@@ -0,0 +1,32 @@
|
|
1
|
+
from typing import Any
|
2
|
+
from orionis.services.introspection.instances.reflection_instance import ReflectionInstance
|
3
|
+
from orionis.container.exceptions.type_error_exception import OrionisContainerTypeError
|
4
|
+
|
5
|
+
class _IsInstance:
|
6
|
+
"""
|
7
|
+
Validator that ensures the provided object is a valid instance (not a class or abstract type).
|
8
|
+
"""
|
9
|
+
|
10
|
+
def __call__(self, instance: Any) -> None:
|
11
|
+
"""
|
12
|
+
Ensures that the provided object is a valid instance.
|
13
|
+
|
14
|
+
Parameters
|
15
|
+
----------
|
16
|
+
instance : Any
|
17
|
+
The object to be validated.
|
18
|
+
|
19
|
+
Raises
|
20
|
+
------
|
21
|
+
OrionisContainerTypeError
|
22
|
+
If the object is not a valid instance.
|
23
|
+
"""
|
24
|
+
try:
|
25
|
+
ReflectionInstance.ensureIsInstance(instance)
|
26
|
+
except Exception as e:
|
27
|
+
raise OrionisContainerTypeError(
|
28
|
+
f"Error registering instance: {e}"
|
29
|
+
) from e
|
30
|
+
|
31
|
+
# Exported singleton instance
|
32
|
+
IsInstance = _IsInstance()
|
@@ -0,0 +1,32 @@
|
|
1
|
+
from typing import Callable
|
2
|
+
from orionis.container.exceptions.container_exception import OrionisContainerException
|
3
|
+
|
4
|
+
class _IsNotSubclass:
|
5
|
+
"""
|
6
|
+
Validator that ensures a class is NOT a subclass of another class.
|
7
|
+
"""
|
8
|
+
|
9
|
+
def __call__(self, abstract: Callable[..., any], concrete: Callable[..., any]) -> None:
|
10
|
+
"""
|
11
|
+
Validates that the concrete class is NOT a subclass of the abstract class.
|
12
|
+
|
13
|
+
Parameters
|
14
|
+
----------
|
15
|
+
abstract : Callable[..., Any]
|
16
|
+
The supposed base class or interface.
|
17
|
+
concrete : Callable[..., Any]
|
18
|
+
The implementation class to check.
|
19
|
+
|
20
|
+
Raises
|
21
|
+
------
|
22
|
+
OrionisContainerException
|
23
|
+
If the concrete class IS a subclass of the abstract class.
|
24
|
+
"""
|
25
|
+
if issubclass(concrete, abstract):
|
26
|
+
raise OrionisContainerException(
|
27
|
+
"The concrete class must NOT inherit from the provided abstract class. "
|
28
|
+
"Please ensure that the concrete class is not a subclass of the specified abstract class."
|
29
|
+
)
|
30
|
+
|
31
|
+
# Exported singleton instance
|
32
|
+
IsNotSubclass = _IsNotSubclass()
|
@@ -0,0 +1,32 @@
|
|
1
|
+
from typing import Callable
|
2
|
+
from orionis.container.exceptions.container_exception import OrionisContainerException
|
3
|
+
|
4
|
+
class _IsSubclass:
|
5
|
+
"""
|
6
|
+
Validator that ensures a class is a subclass of a given abstract class.
|
7
|
+
"""
|
8
|
+
|
9
|
+
def __call__(self, abstract: Callable[..., any], concrete: Callable[..., any]) -> None:
|
10
|
+
"""
|
11
|
+
Validates that the concrete class is a subclass of the abstract class.
|
12
|
+
|
13
|
+
Parameters
|
14
|
+
----------
|
15
|
+
abstract : Callable[..., Any]
|
16
|
+
The base or abstract class.
|
17
|
+
concrete : Callable[..., Any]
|
18
|
+
The class to verify.
|
19
|
+
|
20
|
+
Raises
|
21
|
+
------
|
22
|
+
OrionisContainerException
|
23
|
+
If the concrete class is NOT a subclass of the abstract class.
|
24
|
+
"""
|
25
|
+
if not issubclass(concrete, abstract):
|
26
|
+
raise OrionisContainerException(
|
27
|
+
"The concrete class must inherit from the provided abstract class. "
|
28
|
+
"Please ensure that the concrete class is a subclass of the specified abstract class."
|
29
|
+
)
|
30
|
+
|
31
|
+
# Exported singleton instance
|
32
|
+
IsSubclass = _IsSubclass()
|
@@ -0,0 +1,37 @@
|
|
1
|
+
from typing import Any
|
2
|
+
from orionis.container.exceptions.type_error_exception import OrionisContainerTypeError
|
3
|
+
|
4
|
+
class _IsValidAlias:
|
5
|
+
"""
|
6
|
+
Validator that checks if a value is a valid alias string.
|
7
|
+
"""
|
8
|
+
|
9
|
+
_INVALID_CHARS = set(' \t\n\r\x0b\x0c!@#$%^&*()[]{};:,/<>?\\|`~"\'')
|
10
|
+
|
11
|
+
def __call__(self, value: Any) -> None:
|
12
|
+
"""
|
13
|
+
Ensures that the provided value is a valid alias of type str and does not contain invalid characters.
|
14
|
+
|
15
|
+
Parameters
|
16
|
+
----------
|
17
|
+
value : Any
|
18
|
+
The value to check.
|
19
|
+
|
20
|
+
Raises
|
21
|
+
------
|
22
|
+
OrionisContainerTypeError
|
23
|
+
If the value is not of type str or contains invalid characters.
|
24
|
+
"""
|
25
|
+
if not isinstance(value, str):
|
26
|
+
raise OrionisContainerTypeError(
|
27
|
+
f"Expected a string type for alias, but got {type(value).__name__} instead."
|
28
|
+
)
|
29
|
+
|
30
|
+
if any(char in self._INVALID_CHARS for char in value):
|
31
|
+
raise OrionisContainerTypeError(
|
32
|
+
f"Alias '{value}' contains invalid characters. "
|
33
|
+
"Aliases must not contain whitespace or special symbols."
|
34
|
+
)
|
35
|
+
|
36
|
+
# Exported singleton instance
|
37
|
+
IsValidAlias = _IsValidAlias()
|
orionis/metadata/framework.py
CHANGED
@@ -130,6 +130,20 @@ class ReflectionCallable:
|
|
130
130
|
return Coroutine(self.__function(*args, **kwargs)).run()
|
131
131
|
return self.__function(*args, **kwargs)
|
132
132
|
|
133
|
+
def getSignature(self) -> inspect.Signature:
|
134
|
+
"""
|
135
|
+
Retrieve the signature of the callable function.
|
136
|
+
Returns
|
137
|
+
-------
|
138
|
+
inspect.Signature
|
139
|
+
An `inspect.Signature` object representing the callable's signature.
|
140
|
+
Notes
|
141
|
+
-----
|
142
|
+
This method provides detailed information about the parameters of the callable,
|
143
|
+
including their names, default values, and annotations.
|
144
|
+
"""
|
145
|
+
return inspect.signature(self.__function)
|
146
|
+
|
133
147
|
def getDependencies(self) -> CallableDependency:
|
134
148
|
"""
|
135
149
|
Analyzes the callable associated with this instance and retrieves its dependencies.
|
@@ -1442,6 +1442,17 @@ class ReflectionConcrete(IReflectionConcrete):
|
|
1442
1442
|
|
1443
1443
|
return prop.fget.__doc__ if prop.fget else None
|
1444
1444
|
|
1445
|
+
def getConstructorSignature(self) -> inspect.Signature:
|
1446
|
+
"""
|
1447
|
+
Get the signature of the constructor of the instance's class.
|
1448
|
+
|
1449
|
+
Returns
|
1450
|
+
-------
|
1451
|
+
inspect.Signature
|
1452
|
+
The signature of the constructor
|
1453
|
+
"""
|
1454
|
+
return inspect.signature(self._concrete.__init__)
|
1455
|
+
|
1445
1456
|
def getConstructorDependencies(self) -> ClassDependency:
|
1446
1457
|
"""
|
1447
1458
|
Get the resolved and unresolved dependencies from the constructor of the instance's class.
|
@@ -135,12 +135,23 @@ orionis/console/output/console.py,sha256=TE_Hl720ADd82dbERFSWhkoQRukDQZmETSw4nkw
|
|
135
135
|
orionis/console/output/executor.py,sha256=bdvkzW2-buy0BPpy2r5qUGrRFW2Ay6k-5rSeHb0gQ3o,3352
|
136
136
|
orionis/console/output/progress_bar.py,sha256=vFy582z6VJS46LV6tuyrmr9qvdVeTEtw3hyNcEHezeg,3088
|
137
137
|
orionis/console/output/styles.py,sha256=6a4oQCOBOKMh2ARdeq5GlIskJ3wjiylYmh66tUKKmpQ,4053
|
138
|
-
orionis/container/container.py,sha256=
|
138
|
+
orionis/container/container.py,sha256=HHEXnObv1Q_022dfGpTOx6cwyRPa7ooD8FfqJ_cDCro,37291
|
139
|
+
orionis/container/resolver.py,sha256=9nojqjrYYXw2kQUzyuLkHs-os5dDxq6ntZ8e8IbYIu0,704
|
140
|
+
orionis/container/contracts/container.py,sha256=LkZ5til_3Um8ctCVTwuO36HkysL59saKwUzXR5cWUBs,5750
|
139
141
|
orionis/container/entities/binding.py,sha256=Qp6Lf4XUDp2NjqXDAC2lzvhOFQWiBDKiGFcKfwb4axw,4342
|
140
142
|
orionis/container/enums/lifetimes.py,sha256=RqQmugMIB1Ev_j_vFLcWorndm-to7xg4stQ7yKFDdDw,190
|
141
143
|
orionis/container/exceptions/container_exception.py,sha256=goTDEwC70xTMD2qppN8KV-xyR0Nps218OD4D1LZ2-3s,470
|
142
144
|
orionis/container/exceptions/type_error_exception.py,sha256=cYuvoXVOgRYj3tZPfK341aUERkf33-buOiI2eXxcrAw,470
|
143
145
|
orionis/container/exceptions/value_exception.py,sha256=hjY0YEusoL3DurME1ornxvIv1wyGaf6tBggLFlGHblo,472
|
146
|
+
orionis/container/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
147
|
+
orionis/container/validators/implements.py,sha256=iSoDxxTalQKhyKjvsojFlkROhBFvAjvJxRvPJlmGrSg,2843
|
148
|
+
orionis/container/validators/is_abstract_class.py,sha256=Q-Lqyrrps6oj2XWI0KFRp-hDZf4_sgbZlEbfBXj5XT4,1169
|
149
|
+
orionis/container/validators/is_callable.py,sha256=8Bi5AflNmXhpgtk1ieirE3xgCKzq3mcgyqokCU3GHN8,843
|
150
|
+
orionis/container/validators/is_concrete_class.py,sha256=BMhJ7vCQ2ccBA3qrRJPlsYDTSqBpqLZFfrdEGO5mlr4,1215
|
151
|
+
orionis/container/validators/is_instance.py,sha256=vUwWIMeG1zLMsGX9GyoOU-LZtCgqBDZ9hUNDj_KyuYo,999
|
152
|
+
orionis/container/validators/is_not_subclass.py,sha256=-iZw5ZCYnQtlU-xPO-o7lUj5DxPkN0G67-bLbLVhwtw,1167
|
153
|
+
orionis/container/validators/is_subclass.py,sha256=O2aF0KLg5ZnDutKQ1xDvet34kentftlqgEkRNvumCoM,1135
|
154
|
+
orionis/container/validators/is_valid_alias.py,sha256=avm6uz-huVi_kRov4BksSToslIHQfz-MLynjkzhdSRM,1246
|
144
155
|
orionis/foundation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
145
156
|
orionis/foundation/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
146
157
|
orionis/foundation/config/startup.py,sha256=JKAH2ZRhlAZgkD2w11LR1-TVktfjSH9cHo3PsZXOLrg,8275
|
@@ -232,7 +243,7 @@ orionis/foundation/contracts/config.py,sha256=Rpz6U6t8OXHO9JJKSTnCimytXE-tfCB-1i
|
|
232
243
|
orionis/foundation/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
233
244
|
orionis/foundation/exceptions/integrity.py,sha256=mc4pL1UMoYRHEmphnpW2oGk5URhu7DJRREyzHaV-cs8,472
|
234
245
|
orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
235
|
-
orionis/metadata/framework.py,sha256=
|
246
|
+
orionis/metadata/framework.py,sha256=sBQIEDehFdisleRXQSFyOhHx2bVTGjprHNNBI_Famsw,4960
|
236
247
|
orionis/metadata/package.py,sha256=tqLfBRo-w1j_GN4xvzUNFyweWYFS-qhSgAEc-AmCH1M,5452
|
237
248
|
orionis/patterns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
238
249
|
orionis/patterns/singleton/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -259,9 +270,9 @@ orionis/services/introspection/reflection.py,sha256=6z4VkDICohMIkm9jEd7nmFABwVuU
|
|
259
270
|
orionis/services/introspection/abstract/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
260
271
|
orionis/services/introspection/abstract/reflection_abstract.py,sha256=SPK2X11VvGORxxPOYloaD6hPAvky--obRU4CO1DE4zM,43865
|
261
272
|
orionis/services/introspection/callables/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
262
|
-
orionis/services/introspection/callables/reflection_callable.py,sha256=
|
273
|
+
orionis/services/introspection/callables/reflection_callable.py,sha256=0B2B6ZV-ql_aZk97W4Q12MVvi0gwErjekgWaMBxjfV0,6147
|
263
274
|
orionis/services/introspection/concretes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
264
|
-
orionis/services/introspection/concretes/reflection_concrete.py,sha256=
|
275
|
+
orionis/services/introspection/concretes/reflection_concrete.py,sha256=SdE2IWEgt30eO9-f_VRNdIZ_OWWidauQzQZQVrXjcXY,51310
|
265
276
|
orionis/services/introspection/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
266
277
|
orionis/services/introspection/contracts/reflect_dependencies.py,sha256=5fdImZarC1ixoFM-1JSBx28RvYbY3GGZhDGjar7cvHc,1771
|
267
278
|
orionis/services/introspection/contracts/reflection_abstract.py,sha256=-ugpFcAkGTlk0Md5ft8NrvupnlfVji8QZjGYqWBxqeY,22370
|
@@ -344,7 +355,7 @@ orionis/test/suite/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
344
355
|
orionis/test/suite/test_unit.py,sha256=MWgW8dRCRyT1XZ5LsbXQ7-KVPReasoXwzEEL1EWWfE4,52190
|
345
356
|
orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
346
357
|
orionis/test/view/render.py,sha256=jXZkbITBknbUwm_mD8bcTiwLDvsFkrO9qrf0ZgPwqxc,4903
|
347
|
-
orionis-0.
|
358
|
+
orionis-0.320.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
|
348
359
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
349
360
|
tests/example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
350
361
|
tests/example/test_example.py,sha256=kvWgiW3ADEZf718dGsMPtDh_rmOSx1ypEInKm7_6ZPQ,601
|
@@ -445,8 +456,8 @@ tests/support/wrapper/test_services_wrapper_docdict.py,sha256=yeVwl-VcwkWSQYyxZu
|
|
445
456
|
tests/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
446
457
|
tests/testing/test_testing_result.py,sha256=MrGK3ZimedL0b5Ydu69Dg8Iul017AzLTm7VPxpXlpfU,4315
|
447
458
|
tests/testing/test_testing_unit.py,sha256=DjLBtvVn8B1KlVJNNkstBT8_csA1yeaMqnGrbanN_J4,7438
|
448
|
-
orionis-0.
|
449
|
-
orionis-0.
|
450
|
-
orionis-0.
|
451
|
-
orionis-0.
|
452
|
-
orionis-0.
|
459
|
+
orionis-0.320.0.dist-info/METADATA,sha256=J4HkjZk_1Wa2wuK0UZboolNPepT3CA4uflTNQrXlGk0,4772
|
460
|
+
orionis-0.320.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
461
|
+
orionis-0.320.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
|
462
|
+
orionis-0.320.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
463
|
+
orionis-0.320.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|