orionis 0.367.0__py3-none-any.whl → 0.368.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.
@@ -0,0 +1,58 @@
1
+ from abc import ABC, abstractmethod
2
+ from typing import Any
3
+ from orionis.container.contracts.container import IContainer
4
+ from orionis.container.entities.binding import Binding
5
+
6
+ class IResolver(ABC):
7
+ """
8
+ Interface for dependency resolution in the container system.
9
+
10
+ This interface defines the contract for resolvers that handle
11
+ dependency injection and instance creation based on bindings.
12
+ """
13
+
14
+ @abstractmethod
15
+ def __init__(self, container: IContainer) -> None:
16
+ """
17
+ Initialize the resolver with a container reference.
18
+
19
+ Parameters
20
+ ----------
21
+ container : IContainer
22
+ The container instance that this resolver will use to resolve dependencies.
23
+ """
24
+ pass
25
+
26
+ @abstractmethod
27
+ def resolve(
28
+ self,
29
+ binding: Binding,
30
+ *args,
31
+ **kwargs
32
+ ) -> Any:
33
+ """
34
+ Resolves an instance from a binding.
35
+
36
+ This method resolves an instance based on the binding's lifetime and type.
37
+ It delegates to specific resolution methods based on the lifetime (transient, singleton, or scoped).
38
+
39
+ Parameters
40
+ ----------
41
+ binding : Binding
42
+ The binding to resolve.
43
+ *args : tuple
44
+ Additional positional arguments to pass to the constructor.
45
+ **kwargs : dict
46
+ Additional keyword arguments to pass to the constructor.
47
+
48
+ Returns
49
+ -------
50
+ Any
51
+ The resolved instance.
52
+
53
+ Raises
54
+ ------
55
+ OrionisContainerException
56
+ If the binding is not an instance of Binding or if resolution fails.
57
+ """
58
+ pass
@@ -1,6 +1,7 @@
1
1
  from typing import Any, Callable
2
2
  from orionis.container.context.scope import ScopedContext
3
3
  from orionis.container.contracts.container import IContainer
4
+ from orionis.container.contracts.resolver import IResolver
4
5
  from orionis.container.entities.binding import Binding
5
6
  from orionis.container.enums.lifetimes import Lifetime
6
7
  from orionis.container.exceptions import OrionisContainerException
@@ -8,7 +9,7 @@ from orionis.services.introspection.callables.reflection import ReflectionCallab
8
9
  from orionis.services.introspection.concretes.reflection import ReflectionConcrete
9
10
  from orionis.services.introspection.dependencies.entities.resolved_dependencies import ResolvedDependency
10
11
 
11
- class Resolver:
12
+ class Resolver(IResolver):
12
13
  """
13
14
  Resolver class for handling dependency resolution in the container.
14
15
  """
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.367.0"
8
+ VERSION = "0.368.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orionis
3
- Version: 0.367.0
3
+ Version: 0.368.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
@@ -117,6 +117,7 @@ orionis/container/context/manager.py,sha256=9yODWkHBoJ2kgJZ5ONLqcEcex50vaWuMcxsv
117
117
  orionis/container/context/scope.py,sha256=CWFiLLTAC_IdmeFKWX-jrphdxB0_TMEVBlz6lQVMPC8,937
118
118
  orionis/container/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
119
119
  orionis/container/contracts/container.py,sha256=hOO3w2yqVhp2nPTeS1uJEYgXSTbM3xwezDCOSNMC_a0,7603
120
+ orionis/container/contracts/resolver.py,sha256=mR7lztPAQDwyspoQewaTMQPxJaoOCA88euDevaZYHGo,1712
120
121
  orionis/container/contracts/service_provider.py,sha256=hXp-l4iP7q0FhsCcQAKoYcJ_zxCzIgTdfmO4F0Bbssg,896
121
122
  orionis/container/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
122
123
  orionis/container/entities/binding.py,sha256=hoGTsIn8AbUdrYmyuE7bfwmFxss1zx35EPuDV1VwtKM,4321
@@ -132,7 +133,7 @@ orionis/container/facades/facade.py,sha256=22AMMDEqfUCIj2EsGTnjTKLsnLq3QhhqpV6mp
132
133
  orionis/container/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
133
134
  orionis/container/providers/service_provider.py,sha256=9SHDzeuJbktRhrLq0zo2fZhRR4xOaYGOb2wKl7iBR4k,1923
134
135
  orionis/container/resolver/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
135
- orionis/container/resolver/resolver.py,sha256=YRohopELIol-UT17xrjNN-5ndefxJ790BZqBZcLZWMM,17976
136
+ orionis/container/resolver/resolver.py,sha256=prEpMxx1bLV8d-TjMeXezrKPO1sntrMiawGiK3RSKc4,18047
136
137
  orionis/container/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
137
138
  orionis/container/validators/implements.py,sha256=xDXK7yhG5GGGRT9Mj1UbbVrcVTgifmjFZdaAJG4Ke8o,3110
138
139
  orionis/container/validators/is_abstract_class.py,sha256=vJqUPn610YZS0sEkV8c_gPZskIgWmFHjg3D3MF2OTs8,1141
@@ -244,7 +245,7 @@ orionis/foundation/providers/path_resolver_provider.py,sha256=rXvaVc5sSqmDgRzWJo
244
245
  orionis/foundation/providers/progress_bar_provider.py,sha256=75Jr4iEgUOUGl8Di1DioeP5_HRQlR-1lVzPmS96sWjA,737
245
246
  orionis/foundation/providers/workers_provider.py,sha256=WWlji3C69_-Y0c42aZDbR_bmcE_qZEh2SaA_cNkCivI,702
246
247
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
247
- orionis/metadata/framework.py,sha256=op40ECQ1mdpzRCwRBpTPfxxK748oM4rBeIjH_9TjRVw,4960
248
+ orionis/metadata/framework.py,sha256=YsEon2YEhIiRW2ecIazUDyccCGpcyKzQwOgszAQA_fw,4960
248
249
  orionis/metadata/package.py,sha256=tqLfBRo-w1j_GN4xvzUNFyweWYFS-qhSgAEc-AmCH1M,5452
249
250
  orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
250
251
  orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -376,7 +377,7 @@ orionis/test/output/dumper.py,sha256=3EV-G3KgEV4O0M4yl-4klPKc1etWOPZvPAcYhUQyXnI
376
377
  orionis/test/output/printer.py,sha256=WGjGW2lgu_l5wWJ6Z8qTTV7NAObhoTBcvhM1TcNvwU4,16938
377
378
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
378
379
  orionis/test/view/render.py,sha256=jXZkbITBknbUwm_mD8bcTiwLDvsFkrO9qrf0ZgPwqxc,4903
379
- orionis-0.367.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
380
+ orionis-0.368.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
380
381
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
381
382
  tests/example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
382
383
  tests/example/test_example.py,sha256=kvWgiW3ADEZf718dGsMPtDh_rmOSx1ypEInKm7_6ZPQ,601
@@ -477,8 +478,8 @@ tests/support/wrapper/test_services_wrapper_docdict.py,sha256=hIVqGt19vbW22xPjQS
477
478
  tests/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
478
479
  tests/testing/test_testing_result.py,sha256=1O_8xjsFPnzwZOpLT6ImqjO9HY5_jIgP7DTVBsgHvQA,4335
479
480
  tests/testing/test_testing_unit.py,sha256=S3anwYcF2DBWYh_UfqKcZq2FgNpQjP0SfYVRd5sD5rI,7442
480
- orionis-0.367.0.dist-info/METADATA,sha256=yr-g_H-M_u6IHsuT1kRN7I61Y9HyUwoM5-Y5ZVMd6xs,4772
481
- orionis-0.367.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
482
- orionis-0.367.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
483
- orionis-0.367.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
484
- orionis-0.367.0.dist-info/RECORD,,
481
+ orionis-0.368.0.dist-info/METADATA,sha256=V0XIIl9ESUfqKQdGbYonTDHTPRrl0OA8Y540Y1BUBS4,4772
482
+ orionis-0.368.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
483
+ orionis-0.368.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
484
+ orionis-0.368.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
485
+ orionis-0.368.0.dist-info/RECORD,,