orionis 0.4.0__tar.gz → 0.6.0__tar.gz

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.
Files changed (148) hide show
  1. {orionis-0.4.0/orionis.egg-info → orionis-0.6.0}/PKG-INFO +3 -1
  2. {orionis-0.4.0 → orionis-0.6.0}/README.md +2 -0
  3. orionis-0.6.0/orionis/framework.py +35 -0
  4. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/exceptions/cli_exception.py +5 -5
  5. orionis-0.6.0/orionis/luminate/container/container.py +266 -0
  6. orionis-0.6.0/orionis/luminate/container/exception.py +36 -0
  7. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/publisher/pypi.py +11 -2
  8. orionis-0.6.0/orionis/luminate/static/bg/galaxy.jpg +0 -0
  9. orionis-0.6.0/orionis/luminate/static/favicon/OrionisFrameworkFavicon.png +0 -0
  10. orionis-0.6.0/orionis/luminate/static/logos/OrionisFramework3.png +0 -0
  11. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/test/exception.py +1 -1
  12. {orionis-0.4.0 → orionis-0.6.0/orionis.egg-info}/PKG-INFO +3 -1
  13. {orionis-0.4.0 → orionis-0.6.0}/orionis.egg-info/SOURCES.txt +5 -0
  14. orionis-0.4.0/orionis/framework.py +0 -45
  15. {orionis-0.4.0 → orionis-0.6.0}/LICENCE +0 -0
  16. {orionis-0.4.0 → orionis-0.6.0}/MANIFEST.in +0 -0
  17. {orionis-0.4.0 → orionis-0.6.0}/orionis/__init__.py +0 -0
  18. {orionis-0.4.0 → orionis-0.6.0}/orionis/cli_manager.py +0 -0
  19. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/__init__.py +0 -0
  20. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/app.py +0 -0
  21. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/bootstrap/__init__.py +0 -0
  22. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/bootstrap/parser.py +0 -0
  23. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/bootstrap/register.py +0 -0
  24. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/cache/__init__.py +0 -0
  25. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/cache/app/__init__.py +0 -0
  26. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/cache/app/config.py +0 -0
  27. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/cache/console/__init__.py +0 -0
  28. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/cache/console/commands.py +0 -0
  29. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/config/__init__.py +0 -0
  30. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/config/dataclass/__init__.py +0 -0
  31. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/config/dataclass/app.py +0 -0
  32. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/config/dataclass/auth.py +0 -0
  33. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/config/dataclass/cache.py +0 -0
  34. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/config/dataclass/cors.py +0 -0
  35. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/config/dataclass/database.py +0 -0
  36. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/config/dataclass/filesystems.py +0 -0
  37. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/config/dataclass/logging.py +0 -0
  38. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/config/dataclass/mail.py +0 -0
  39. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/config/dataclass/queue.py +0 -0
  40. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/config/dataclass/session.py +0 -0
  41. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/config/environment.py +0 -0
  42. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/config/sections.py +0 -0
  43. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/__init__.py +0 -0
  44. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/base/__init__.py +0 -0
  45. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/base/command.py +0 -0
  46. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/cache.py +0 -0
  47. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/command.py +0 -0
  48. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/command_filter.py +0 -0
  49. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/commands/__init__.py +0 -0
  50. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/commands/cache_clear.py +0 -0
  51. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/commands/help.py +0 -0
  52. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/commands/schedule_work.py +0 -0
  53. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/commands/tests.py +0 -0
  54. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/commands/version.py +0 -0
  55. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/exceptions/__init__.py +0 -0
  56. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/kernel.py +0 -0
  57. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/output/__init__.py +0 -0
  58. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/output/console.py +0 -0
  59. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/output/executor.py +0 -0
  60. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/output/progress_bar.py +0 -0
  61. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/output/styles.py +0 -0
  62. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/parser.py +0 -0
  63. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/register.py +0 -0
  64. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/runner.py +0 -0
  65. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/scripts/__init__.py +0 -0
  66. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/scripts/management.py +0 -0
  67. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/tasks/__init__.py +0 -0
  68. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/console/tasks/scheduler.py +0 -0
  69. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/__init__.py +0 -0
  70. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/bootstrap/parser_interface.py +0 -0
  71. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/cache/__init__.py +0 -0
  72. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/cache/cache_commands_interface.py +0 -0
  73. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/config/__init__.py +0 -0
  74. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/config/config_interface.py +0 -0
  75. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/config/environment_interface.py +0 -0
  76. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/console/__init__.py +0 -0
  77. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/console/base_command_interface.py +0 -0
  78. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/console/cli_cache_interface.py +0 -0
  79. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/console/command_filter_interface.py +0 -0
  80. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/console/command_interface.py +0 -0
  81. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/console/console_interface.py +0 -0
  82. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/console/executor_interface.py +0 -0
  83. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/console/kernel_interface.py +0 -0
  84. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/console/management_interface.py +0 -0
  85. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/console/parser_interface.py +0 -0
  86. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/console/progress_bar_interface.py +0 -0
  87. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/console/register_interface.py +0 -0
  88. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/console/runner_interface.py +0 -0
  89. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/console/schedule_interface.py +0 -0
  90. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/console/task_manager_interface.py +0 -0
  91. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/facades/__init__.py +0 -0
  92. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/facades/env_interface.py +0 -0
  93. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/facades/log_interface.py +0 -0
  94. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/facades/paths_interface.py +0 -0
  95. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/facades/tests_interface.py +0 -0
  96. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/files/__init__.py +0 -0
  97. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/files/paths_interface.py +0 -0
  98. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/installer/__init__.py +0 -0
  99. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/installer/output_interface.py +0 -0
  100. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/installer/setup_interface.py +0 -0
  101. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/installer/upgrade_interface.py +0 -0
  102. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/log/__init__.py +0 -0
  103. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/log/logger_interface.py +0 -0
  104. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/pipelines/cli_pipeline_interface.py +0 -0
  105. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/publisher/__init__.py +0 -0
  106. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/publisher/pypi_publisher_interface.py +0 -0
  107. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/test/__init__.py +0 -0
  108. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/test/unit_test_interface.py +0 -0
  109. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/tools/__init__.py +0 -0
  110. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/tools/reflection_interface.py +0 -0
  111. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/contracts/tools/std_interface.py +0 -0
  112. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/facades/__init__.py +0 -0
  113. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/facades/environment.py +0 -0
  114. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/facades/log.py +0 -0
  115. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/facades/paths.py +0 -0
  116. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/facades/tests.py +0 -0
  117. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/files/__init__.py +0 -0
  118. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/files/paths.py +0 -0
  119. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/installer/__init__.py +0 -0
  120. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/installer/icon.ascii +0 -0
  121. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/installer/info.ascii +0 -0
  122. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/installer/output.py +0 -0
  123. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/installer/setup.py +0 -0
  124. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/installer/upgrade.py +0 -0
  125. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/log/__init__.py +0 -0
  126. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/log/logger.py +0 -0
  127. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/pipelines/__init__.py +0 -0
  128. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/pipelines/cli_pipeline.py +0 -0
  129. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/publisher/__init__.py +0 -0
  130. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/static/logos/OrionisFramework.jpg +0 -0
  131. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/static/logos/OrionisFramework.png +0 -0
  132. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/static/logos/OrionisFramework.psd +0 -0
  133. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/static/logos/OrionisFramework2.png +0 -0
  134. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/test/__init__.py +0 -0
  135. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/test/unit_test.py +0 -0
  136. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/tools/__init__.py +0 -0
  137. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/tools/reflection.py +0 -0
  138. {orionis-0.4.0 → orionis-0.6.0}/orionis/luminate/tools/std.py +0 -0
  139. {orionis-0.4.0 → orionis-0.6.0}/orionis.egg-info/dependency_links.txt +0 -0
  140. {orionis-0.4.0 → orionis-0.6.0}/orionis.egg-info/entry_points.txt +0 -0
  141. {orionis-0.4.0 → orionis-0.6.0}/orionis.egg-info/requires.txt +0 -0
  142. {orionis-0.4.0 → orionis-0.6.0}/orionis.egg-info/top_level.txt +0 -0
  143. {orionis-0.4.0 → orionis-0.6.0}/setup.cfg +0 -0
  144. {orionis-0.4.0 → orionis-0.6.0}/setup.py +0 -0
  145. {orionis-0.4.0 → orionis-0.6.0}/tests/__init__.py +0 -0
  146. {orionis-0.4.0 → orionis-0.6.0}/tests/tools/__init__.py +0 -0
  147. {orionis-0.4.0 → orionis-0.6.0}/tests/tools/class_example.py +0 -0
  148. {orionis-0.4.0 → orionis-0.6.0}/tests/tools/test_reflection.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: orionis
3
- Version: 0.4.0
3
+ Version: 0.6.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
@@ -27,6 +27,8 @@ Dynamic: summary
27
27
 
28
28
  🚀 **Orionis Framework – Elegant, Fast, and Powerful** ⚡
29
29
 
30
+ ![Orionis Framework Logo](https://raw.githubusercontent.com/orionis-framework/framework/refs/heads/1.x/orionis/luminate/static/logos/OrionisFramework.png)
31
+
30
32
  🔬 **(Currently in Beta – Evolving Towards Perfection!)**
31
33
 
32
34
  ---
@@ -2,6 +2,8 @@
2
2
 
3
3
  🚀 **Orionis Framework – Elegant, Fast, and Powerful** ⚡
4
4
 
5
+ ![Orionis Framework Logo](https://raw.githubusercontent.com/orionis-framework/framework/refs/heads/1.x/orionis/luminate/static/logos/OrionisFramework.png)
6
+
5
7
  🔬 **(Currently in Beta – Evolving Towards Perfection!)**
6
8
 
7
9
  ---
@@ -0,0 +1,35 @@
1
+ #--------------------------------------------------------------------------
2
+ # Framework Information
3
+ #--------------------------------------------------------------------------
4
+ # Name of the framework
5
+ NAME = "orionis"
6
+
7
+ # Current version of the framework
8
+ VERSION = "0.6.0"
9
+
10
+ # Full name of the author or maintainer of the project
11
+ AUTHOR = "Raul Mauricio Uñate Castro"
12
+
13
+ # Email address of the author or maintainer for contact purposes
14
+ AUTHOR_EMAIL = "raulmauriciounate@gmail.com"
15
+
16
+ # Short description of the project or framework
17
+ DESCRIPTION = "Orionis Framework – Elegant, Fast, and Powerful."
18
+
19
+ #--------------------------------------------------------------------------
20
+ # Project URLs
21
+ #--------------------------------------------------------------------------
22
+ # URL to the project's skeleton or template repository (for initial setup)
23
+ SKELETON = "https://github.com/orionis-framework/skeleton"
24
+
25
+ # URL to the project's main framework repository
26
+ FRAMEWORK = "https://github.com/orionis-framework/framework"
27
+
28
+ # URL to the project's documentation
29
+ DOCS = "https://github.com/orionis-framework/docs"
30
+
31
+ #--------------------------------------------------------------------------
32
+ # Python Requirements
33
+ #--------------------------------------------------------------------------
34
+ # Minimum Python version required to run the project
35
+ PYTHON_REQUIRES = ">=3.12"
@@ -38,9 +38,9 @@ class CLIOrionisException(Exception):
38
38
  str
39
39
  A string containing the exception name and the response message.
40
40
  """
41
- return f"CLIOrionisException: {self.response}"
41
+ return f"[CLIOrionisException]: {self.response}"
42
42
 
43
- class CLIOrionisValueError(Exception):
43
+ class CLIOrionisValueError(ValueError):
44
44
  """
45
45
  Custom exception raised when there is an issue with dumping the Orionis data.
46
46
 
@@ -80,7 +80,7 @@ class CLIOrionisValueError(Exception):
80
80
  str
81
81
  A string containing the exception name and the response message.
82
82
  """
83
- return f"CLIOrionisValueError: {self.response}"
83
+ return f"[CLIOrionisValueError]: {self.response}"
84
84
 
85
85
  class CLIOrionisScheduleException(Exception):
86
86
  """
@@ -104,7 +104,7 @@ class CLIOrionisScheduleException(Exception):
104
104
 
105
105
  def __init__(self, response: str):
106
106
  """
107
- Initializes the CLIOrionisValueError with the given response message.
107
+ Initializes the CLIOrionisScheduleException with the given response message.
108
108
 
109
109
  Parameters
110
110
  ----------
@@ -122,4 +122,4 @@ class CLIOrionisScheduleException(Exception):
122
122
  str
123
123
  A string containing the exception name and the response message.
124
124
  """
125
- return f"CLIOrionisValueError: {self.response}"
125
+ return f"[CLIOrionisScheduleException]: {self.response}"
@@ -0,0 +1,266 @@
1
+ import inspect
2
+ from typing import Any, Callable
3
+ from orionis.luminate.container.exception import OrionisContainerException, OrionisContainerValueError
4
+
5
+ class Container:
6
+ """Service container and dependency injection."""
7
+
8
+ _instance = None
9
+
10
+ def __new__(cls):
11
+ if cls._instance is None:
12
+ cls._instance = super().__new__(cls)
13
+ cls._instance._bindings = {}
14
+ cls._instance._transients = {}
15
+ cls._instance._singletons = {}
16
+ cls._instance._scoped_services = {}
17
+ cls._instance._instances = {}
18
+ cls._instance._aliases = {}
19
+ cls._instance._scoped_instances = {}
20
+ cls._instance._conditional_bindings = {}
21
+ return cls._instance
22
+
23
+ def bind(self, abstract: str, concrete: Callable[..., Any]) -> None:
24
+ """Registers a service with a specific implementation.
25
+
26
+ Args:
27
+ abstract (str): Name or key of the service to register.
28
+ concrete (Callable[..., Any]): Concrete implementation of the service.
29
+
30
+ Raises:
31
+ OrionisContainerException: If the service is already registered.
32
+ TypeError: If the implementation is not a callable or instantiable class.
33
+ """
34
+ if self.has(abstract):
35
+ raise OrionisContainerException(f"The service '{abstract}' is already registered in the container.")
36
+
37
+ if not callable(concrete):
38
+ raise TypeError(f"The implementation of '{abstract}' must be a callable or instantiable class.")
39
+
40
+ self._bindings[abstract] = concrete
41
+
42
+ def transient(self, abstract: str, concrete: Callable[..., Any]) -> None:
43
+ """Registers a service as Transient, creating a new instance on each request.
44
+
45
+ Args:
46
+ abstract (str): Name or key of the service to register.
47
+ concrete (Callable[..., Any]): Concrete implementation of the service.
48
+
49
+ Raises:
50
+ OrionisContainerException: If the service is already registered.
51
+ TypeError: If the implementation is not a callable or instantiable class.
52
+ """
53
+ if self.has(abstract):
54
+ raise OrionisContainerException(f"The service '{abstract}' is already registered in the container.")
55
+
56
+ if not callable(concrete):
57
+ raise TypeError(f"The implementation of '{abstract}' must be a callable or instantiable class.")
58
+
59
+ self._transients[abstract] = concrete
60
+
61
+ def singleton(self, abstract: str, concrete: Callable[..., Any]) -> None:
62
+ """Registers a service as Singleton, ensuring a single shared instance.
63
+
64
+ Args:
65
+ abstract (str): Name or key of the service to register.
66
+ concrete (Callable[..., Any]): Concrete implementation of the service.
67
+
68
+ Raises:
69
+ OrionisContainerException: If the service is already registered.
70
+ TypeError: If the implementation is not a callable or instantiable class.
71
+ """
72
+ if self.has(abstract):
73
+ raise OrionisContainerException(f"The service '{abstract}' is already registered in the container.")
74
+
75
+ if not callable(concrete):
76
+ raise TypeError(f"The implementation of '{abstract}' must be a callable or instantiable class.")
77
+
78
+ self._singletons[abstract] = concrete
79
+
80
+ def scoped(self, abstract: str, concrete: Callable[..., Any]) -> None:
81
+ """Registers a service as Scoped, shared within the same request.
82
+
83
+ Args:
84
+ abstract (str): Name or key of the service to register.
85
+ concrete (Callable[..., Any]): Concrete implementation of the service.
86
+
87
+ Raises:
88
+ OrionisContainerException: If the service is already registered.
89
+ TypeError: If the implementation is not a callable or instantiable class.
90
+ """
91
+ if self.has(abstract):
92
+ raise OrionisContainerException(f"The service '{abstract}' is already registered in the container.")
93
+
94
+ if not callable(concrete):
95
+ raise TypeError(f"The implementation of '{abstract}' must be a callable or instantiable class.")
96
+
97
+ self._scoped_services[abstract] = concrete
98
+
99
+ def instance(self, abstract: str, instance: Any) -> None:
100
+ """Registers a specific instance in the container, allowing it to be reused.
101
+
102
+ Args:
103
+ abstract (str): Name or key of the service to register.
104
+ instance (Any): Specific instance of the service to register.
105
+
106
+ Raises:
107
+ OrionisContainerException: If the instance is already registered.
108
+ ValueError: If the provided instance is of an unexpected or invalid type.
109
+ """
110
+ if abstract in self._instances:
111
+ raise OrionisContainerException(f"The instance '{abstract}' is already registered in the container.")
112
+
113
+ if not isinstance(instance, object):
114
+ raise ValueError(f"The instance of '{abstract}' must be a valid object.")
115
+
116
+ self._instances[abstract] = instance
117
+
118
+ def has(self, abstract: str) -> bool:
119
+ """Checks if a service is registered in the container.
120
+
121
+ Args:
122
+ abstract (str): Name or key of the service to check.
123
+
124
+ Returns:
125
+ bool: True if the service is registered, False otherwise.
126
+
127
+ Raises:
128
+ ValueError: If the service name (abstract) is not a valid string.
129
+ """
130
+ # Check that 'abstract' is a string
131
+ if not isinstance(abstract, str):
132
+ raise ValueError(f"The service name '{abstract}' must be a string.")
133
+
134
+ # Efficient check if the service is in any of the containers
135
+ return any(abstract in container for container in [
136
+ self._bindings,
137
+ self._transients,
138
+ self._singletons,
139
+ self._scoped_services,
140
+ self._instances
141
+ ])
142
+
143
+ def alias(self, abstract: str, alias: str) -> None:
144
+ """Creates an alias for a registered service, allowing access to the service using an alternative name.
145
+
146
+ Args:
147
+ abstract (str): Name or key of the original service.
148
+ alias (str): The alias to assign to the service.
149
+
150
+ Raises:
151
+ OrionisContainerException: If the original service is not registered.
152
+ ValueError: If the alias is not a valid string or is already in use.
153
+ """
154
+ # Validate alias type
155
+ if not isinstance(alias, str) or not alias:
156
+ raise ValueError("The alias must be a non-empty string.")
157
+
158
+ # Check if the original service is registered
159
+ if not self.has(abstract):
160
+ raise OrionisContainerException(f"The service '{abstract}' is not registered in the container.")
161
+
162
+ # Check if the alias is already in use
163
+ if alias in self._aliases:
164
+ raise ValueError(f"The alias '{alias}' is already in use.")
165
+
166
+ self._aliases[alias] = abstract
167
+
168
+ def make(self, abstract: str):
169
+ """Automatically resolves a dependency, handling instances, singletons, scoped, transients, and aliases.
170
+
171
+ This method resolves the dependencies of a service and handles the following service types:
172
+ 1. **Instances**: Returns a specific instance.
173
+ 2. **Singletons**: Returns the same unique instance each time.
174
+ 3. **Scoped**: Returns a shared instance within the same request.
175
+ 4. **Transients**: Creates a new instance each time.
176
+ 5. **Aliases**: Resolves an alias to the original service.
177
+
178
+ Args:
179
+ abstract (str): Name or key of the service to resolve.
180
+
181
+ Returns:
182
+ Any: The resolved instance or service.
183
+
184
+ Raises:
185
+ OrionisContainerException: If the service is not found.
186
+ """
187
+ # If the service is a specific instance, return it directly
188
+ if abstract in self._instances:
189
+ return self._instances[abstract]
190
+
191
+ # If it is a singleton, return the same instance or resolve it if it is not yet resolved
192
+ if abstract in self._singletons:
193
+ if abstract not in self._instances:
194
+ self._instances[abstract] = self._resolve(self._singletons[abstract])
195
+ return self._instances[abstract]
196
+
197
+ # If it is a scoped service, validate that it is in the same request context
198
+ if abstract in self._scoped_services:
199
+ if abstract not in self._scoped_instances:
200
+ self._scoped_instances[abstract] = self._resolve(self._scoped_services[abstract])
201
+ return self._scoped_instances[abstract]
202
+
203
+ # If it is a transient service, create a new instance each time
204
+ if abstract in self._transients:
205
+ return self._resolve(self._transients[abstract])
206
+
207
+ # If it is a regular binding, resolve it directly
208
+ if abstract in self._bindings:
209
+ return self._resolve(self._bindings[abstract])
210
+
211
+ # If it is an alias, resolve the alias recursively
212
+ if abstract in self._aliases:
213
+ return self.make(self._aliases[abstract])
214
+
215
+ raise OrionisContainerValueError(f"No definition found for '{abstract}'. Ensure the service is registered.")
216
+
217
+ def _resolve(self, concrete: Callable[..., Any]):
218
+ """Automatically resolves the dependencies of a service, handling its constructor dependencies.
219
+
220
+ If the service is a class, it recursively resolves its dependencies (constructor parameters).
221
+
222
+ Args:
223
+ concrete (Callable[..., Any]): Concrete implementation of the service.
224
+
225
+ Returns:
226
+ Any: The resolved service instance.
227
+
228
+ Raises:
229
+ ValueError: If there is a constructor parameter whose type cannot be resolved.
230
+ """
231
+ if inspect.isclass(concrete):
232
+ constructor = inspect.signature(concrete.__init__)
233
+ parameters = constructor.parameters
234
+
235
+ # If the class has no parameters in its constructor, instantiate it directly
236
+ if len(parameters) == 0 or (len(parameters) == 1 and "self" in parameters):
237
+ return concrete()
238
+
239
+ dependencies = {}
240
+ for name, param in parameters.items():
241
+ if name == "self" or param.kind in (param.VAR_POSITIONAL, param.VAR_KEYWORD):
242
+ continue
243
+
244
+ param_type = param.annotation
245
+ if param_type == param.empty:
246
+ raise OrionisContainerValueError(f"Parameter type {name} not specified in {concrete.__name__}")
247
+
248
+ dep_name = param_type.__name__
249
+
250
+ # Conditional resolution of dependencies, if registered
251
+ if concrete in self._conditional_bindings and dep_name in self._conditional_bindings[concrete]:
252
+ dependencies[name] = self.make(self._conditional_bindings[concrete][dep_name])
253
+ else:
254
+ dependencies[name] = self.make(dep_name)
255
+
256
+ return concrete(**dependencies)
257
+
258
+ return concrete(self)
259
+
260
+ def startRequest(self):
261
+ """Starts a new request and clears the Scoped instances.
262
+
263
+ This method should be called at the beginning of each request to ensure that
264
+ scoped services do not persist between requests.
265
+ """
266
+ self._scoped_instances = {}
@@ -0,0 +1,36 @@
1
+ class OrionisContainerException(Exception):
2
+ """
3
+ Excepción personalizada para errores relacionados con el contenedor de inyección de dependencias Orionis.
4
+ """
5
+
6
+ def __init__(self, message: str) -> None:
7
+ """
8
+ Inicializa la excepción con un mensaje de error.
9
+
10
+ Args:
11
+ message (str): Mensaje descriptivo del error.
12
+ """
13
+ super().__init__(message)
14
+
15
+ def __str__(self) -> str:
16
+ """Retorna una representación en cadena de la excepción."""
17
+ return f"[OrionisContainerException] {self.args[0]}"
18
+
19
+
20
+ class OrionisContainerValueError(ValueError):
21
+ """
22
+ Excepción personalizada para errores de tipo ValueError en el contenedor Orionis.
23
+ """
24
+
25
+ def __init__(self, message: str) -> None:
26
+ """
27
+ Inicializa la excepción con un mensaje de error.
28
+
29
+ Args:
30
+ message (str): Mensaje descriptivo del error.
31
+ """
32
+ super().__init__(message)
33
+
34
+ def __str__(self) -> str:
35
+ """Retorna una representación en cadena de la excepción."""
36
+ return f"[OrionisContainerValueError] {self.args[0]}"
@@ -2,6 +2,7 @@ import os
2
2
  import sys
3
3
  import shutil
4
4
  import subprocess
5
+ import time
5
6
  from orionis.framework import VERSION
6
7
  from orionis.luminate.console.output.console import Console
7
8
  from orionis.luminate.contracts.publisher.pypi_publisher_interface import IPypiPublisher
@@ -70,10 +71,17 @@ class PypiPublisher(IPypiPublisher):
70
71
  subprocess.CalledProcessError
71
72
  If any of the subprocess calls to Git fail.
72
73
  """
73
- subprocess.run(
74
- ["git", "rm", "-r", "--cached", "."], capture_output=True, text=True, cwd=self.project_root
74
+ result = subprocess.run(
75
+ ["git", "rm", "-r", "--cached", "."], capture_output=True, text=True, cwd=self.project_root, check=True
75
76
  )
76
77
 
78
+ # Verificamos si el comando fue exitoso
79
+ if result.returncode == 0:
80
+ Console.info("✅ Archivos removidos del índice con éxito")
81
+
82
+ # Añadimos un pequeño retraso para evitar problemas de sincronización
83
+ time.sleep(4)
84
+
77
85
  git_status = subprocess.run(
78
86
  ["git", "status", "--short"], capture_output=True, text=True, cwd=self.project_root
79
87
  )
@@ -159,6 +167,7 @@ class PypiPublisher(IPypiPublisher):
159
167
  check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, cwd=self.project_root
160
168
  )
161
169
  except Exception as e:
170
+ print(e)
162
171
  Console.fail(f"🔴 Error loading the package. Try changing the version and retry. Error: {e}")
163
172
  Console.warning("⛔ If the issue persists, review the script in detail.")
164
173
  exit()
@@ -45,4 +45,4 @@ class OrionisTestFailureException(Exception):
45
45
  str
46
46
  A formatted string containing the exception name and response message.
47
47
  """
48
- return f"OrionisTestFailureException: {self.response}"
48
+ return f"[OrionisTestFailureException]: {self.response}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: orionis
3
- Version: 0.4.0
3
+ Version: 0.6.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
@@ -27,6 +27,8 @@ Dynamic: summary
27
27
 
28
28
  🚀 **Orionis Framework – Elegant, Fast, and Powerful** ⚡
29
29
 
30
+ ![Orionis Framework Logo](https://raw.githubusercontent.com/orionis-framework/framework/refs/heads/1.x/orionis/luminate/static/logos/OrionisFramework.png)
31
+
30
32
  🔬 **(Currently in Beta – Evolving Towards Perfection!)**
31
33
 
32
34
  ---
@@ -62,6 +62,8 @@ orionis/luminate/console/scripts/__init__.py
62
62
  orionis/luminate/console/scripts/management.py
63
63
  orionis/luminate/console/tasks/__init__.py
64
64
  orionis/luminate/console/tasks/scheduler.py
65
+ orionis/luminate/container/container.py
66
+ orionis/luminate/container/exception.py
65
67
  orionis/luminate/contracts/__init__.py
66
68
  orionis/luminate/contracts/bootstrap/parser_interface.py
67
69
  orionis/luminate/contracts/cache/__init__.py
@@ -124,10 +126,13 @@ orionis/luminate/pipelines/__init__.py
124
126
  orionis/luminate/pipelines/cli_pipeline.py
125
127
  orionis/luminate/publisher/__init__.py
126
128
  orionis/luminate/publisher/pypi.py
129
+ orionis/luminate/static/bg/galaxy.jpg
130
+ orionis/luminate/static/favicon/OrionisFrameworkFavicon.png
127
131
  orionis/luminate/static/logos/OrionisFramework.jpg
128
132
  orionis/luminate/static/logos/OrionisFramework.png
129
133
  orionis/luminate/static/logos/OrionisFramework.psd
130
134
  orionis/luminate/static/logos/OrionisFramework2.png
135
+ orionis/luminate/static/logos/OrionisFramework3.png
131
136
  orionis/luminate/test/__init__.py
132
137
  orionis/luminate/test/exception.py
133
138
  orionis/luminate/test/unit_test.py
@@ -1,45 +0,0 @@
1
- #--------------------------------------------------------------------------
2
- # Name of the project or framework
3
- #--------------------------------------------------------------------------
4
- NAME = "orionis"
5
-
6
- #--------------------------------------------------------------------------
7
- # Current version of the project or framework
8
- #--------------------------------------------------------------------------
9
- VERSION = "0.4.0"
10
-
11
- #--------------------------------------------------------------------------
12
- # Full name of the author or maintainer of the project
13
- #--------------------------------------------------------------------------
14
- AUTHOR = "Raul Mauricio Uñate Castro"
15
-
16
- #--------------------------------------------------------------------------
17
- # Email address of the author or maintainer for contact purposes
18
- #--------------------------------------------------------------------------
19
- AUTHOR_EMAIL = "raulmauriciounate@gmail.com"
20
-
21
- #--------------------------------------------------------------------------
22
- # Short description of the project or framework
23
- #--------------------------------------------------------------------------
24
- DESCRIPTION = "Orionis Framework – Elegant, Fast, and Powerful."
25
-
26
- #--------------------------------------------------------------------------
27
- # URL to the project's skeleton or template repository
28
- # This is typically used for initial project setup
29
- #--------------------------------------------------------------------------
30
- SKELETON = "https://github.com/orionis-framework/skeleton"
31
-
32
- #--------------------------------------------------------------------------
33
- # URL to the project's framework repository
34
- #--------------------------------------------------------------------------
35
- FRAMEWORK = "https://github.com/orionis-framework/framework"
36
-
37
- #--------------------------------------------------------------------------
38
- # URL to the project's documentation
39
- #--------------------------------------------------------------------------
40
- DOCS = "https://github.com/orionis-framework/docs"
41
-
42
- #--------------------------------------------------------------------------
43
- # Minimum Python version required to run the project
44
- #--------------------------------------------------------------------------
45
- PYTHON_REQUIRES = ">=3.12"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes