orionis 0.428.0__py3-none-any.whl → 0.430.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,4 @@
1
+ class Reactor:
2
+
3
+ def __init__(self):
4
+ self._reactors = {}
@@ -114,7 +114,7 @@ class Application(Container, IApplication):
114
114
 
115
115
  # Import core framework kernels
116
116
  from orionis.test.kernel import TestKernel, ITestKernel
117
- from orionis.console.kelnel import KernelCLI, IKernelCLI
117
+ from orionis.console.kernel import KernelCLI, IKernelCLI
118
118
 
119
119
  # Core framework kernels
120
120
  core_kernels = {
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.428.0"
8
+ VERSION = "0.430.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.428.0
3
+ Version: 0.430.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,27 +1,13 @@
1
1
  orionis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- orionis/_console/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- orionis/_console/command_filter.py,sha256=bn0fcWfQg13DrQBaV4NopNxdP-6up0G54Qmhg7r_BKA,1211
4
- orionis/_console/kernel.py,sha256=M4Zc9x-1hrQP7Dq6Ons5UnGoq73XV1Fwa9cwY7zqWbw,883
5
- orionis/_console/parser.py,sha256=s-e7I4vr2rwg2g8eesvrOnp1jcEiLlBJN4wLh3JyKUE,5578
6
- orionis/_console/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- orionis/_console/commands/cache_clear.py,sha256=TNrAyB84QZQv_etn7srt_TPE9j6fLNkqymC-1jZ9XEI,2892
8
- orionis/_console/commands/help.py,sha256=KWHemD2j8YZdX-J6GYL3CNcoByb3XAgxGFzZRZsTKrk,2538
9
- orionis/_console/commands/schedule_work.py,sha256=IcraCM_jvEXGyQpMUz6qWA2uW4ILhEKqOs5UXLBNXGY,2042
10
- orionis/_console/commands/version.py,sha256=r7I782jVS_1kbxAVfViGGj1m4GoDJtrb_V_L4MKYGfU,1051
11
- orionis/_console/dumper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- orionis/_console/dumper/dump_die.py,sha256=AsKrcuPwVgTT3UA8DxqFCzuZsGkaGm7bwkm-pr9XlaE,17089
13
- orionis/_console/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- orionis/_console/output/console.py,sha256=6KlvtE4ys6jJU9yLjAVYIHWDmHfWcOHIn_QGcHiJgq0,18894
15
- orionis/_console/output/executor.py,sha256=sk1l_SmTDE9ZDCUQ95XCwfx7HfBNJFOVs7Kjez9wBSc,3358
16
- orionis/_console/output/progress_bar.py,sha256=EX1d_sw9JRlE2gWu24bBBRpP2mWfgO_P9S6ztvWuZ2Q,3088
17
2
  orionis/console/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
- orionis/console/kelnel.py,sha256=1CuBCLR6KItRt0_m50YQXirJUMX6lJf4Z4vvOjBqaUU,856
3
+ orionis/console/kernel.py,sha256=1CuBCLR6KItRt0_m50YQXirJUMX6lJf4Z4vvOjBqaUU,856
19
4
  orionis/console/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
5
  orionis/console/base/command.py,sha256=2kKyTaEzI16Up-XCUeNeJmDWPLN-CweQm3EgrN9U8NQ,3027
21
6
  orionis/console/base/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
7
  orionis/console/base/contracts/command.py,sha256=s9yjma-s1URkVm0EbVvSkETAm-N8xX7OnZS43P8pvk8,1957
23
8
  orionis/console/commands/version.py,sha256=6usAWQnhmpCY5S95gRm1xVQc0ph-qd7UwMI_5OaDKmQ,1031
24
9
  orionis/console/contracts/kernel.py,sha256=fzD8FNVSKEQ5gW5D83hVecz9dVHgy28rRDORDdghp4s,409
10
+ orionis/console/core/reactor.py,sha256=MIAMrulZKZalJ8Fz6YiyBVpMD-SQh8-rgrHauVz4kWE,72
25
11
  orionis/console/dumper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
12
  orionis/console/dumper/dump.py,sha256=CATERiQ6XuIrKQsDaWcVxzTtlAJI9qLJX44fQxEX8ws,22443
27
13
  orionis/console/dumper/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -76,7 +62,7 @@ orionis/container/validators/is_subclass.py,sha256=4sBaGLoRs8nUhuWjlP0VJqyTwVHYq
76
62
  orionis/container/validators/is_valid_alias.py,sha256=4uAYcq8xov7jZbXnpKpjNkxcZtlTNnL5RRctVPMwJes,1424
77
63
  orionis/container/validators/lifetime.py,sha256=IQ43fDNrxYHMlZH2zlYDJnlkLO_eS4U7Fs3UJgQBidI,1844
78
64
  orionis/foundation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
79
- orionis/foundation/application.py,sha256=0dzMnxCJkFDU3dQWHcGu8V6Vl6GTgJbcAj3KU-bZqFY,49595
65
+ orionis/foundation/application.py,sha256=oDfOdkXRdvY545yPYaW4R6RcMg8IZwDJvG_rgCxWEXs,49595
80
66
  orionis/foundation/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
81
67
  orionis/foundation/config/startup.py,sha256=vbzduprRCNyYeR2nnMaqc1uKXw6PTzAY2jVfXNQKN8I,9691
82
68
  orionis/foundation/config/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -186,7 +172,7 @@ orionis/foundation/providers/progress_bar_provider.py,sha256=WW3grNgH-yV2meSSTeO
186
172
  orionis/foundation/providers/testing_provider.py,sha256=iJSN2RIChbYIL-1ue6vmPmDMCSrvERDkti4Er9MPiLA,1102
187
173
  orionis/foundation/providers/workers_provider.py,sha256=kiQjQRyUEyiBX2zcbF_KmqRgvc7Bvxsvg5oMtIvYniM,1075
188
174
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
189
- orionis/metadata/framework.py,sha256=hQtH6dmV2_XxGLqwzTefzmVqoGk-BXn8vio170CjW9Q,4960
175
+ orionis/metadata/framework.py,sha256=gOqr3DZEEaKEQwMZ91xoZaTwyq9zNWDrYuG-iXvX4a8,4960
190
176
  orionis/metadata/package.py,sha256=tqLfBRo-w1j_GN4xvzUNFyweWYFS-qhSgAEc-AmCH1M,5452
191
177
  orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
192
178
  orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -354,7 +340,7 @@ orionis/test/validators/web_report.py,sha256=-h3Fe9jY93_kzUhd2NBIqEfCcBpu-8Ei9x3
354
340
  orionis/test/validators/workers.py,sha256=LGffDKtK6SKixFKzIYPQpI5aFeQPAGXpv_LUtmEu6g4,1102
355
341
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
356
342
  orionis/test/view/render.py,sha256=3ICz68l-WF3BtnYqH5m-ktN9UD00MELMbmMnyJDV74A,4768
357
- orionis-0.428.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
343
+ orionis-0.430.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
358
344
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
359
345
  tests/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
360
346
  tests/container/test_container.py,sha256=asv8TkkupVoex6SWod74NBl4dSs7wb9mLmu_glNdNy8,14815
@@ -499,8 +485,8 @@ tests/testing/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
499
485
  tests/testing/validators/test_testing_validators.py,sha256=QdcF0Vhnnl_kD-PzceHJbUYOqwPTB1Td7YaTv8LTr30,19612
500
486
  tests/testing/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
501
487
  tests/testing/view/test_render.py,sha256=-ghGG8rimyb2b2wtvMuSPPH7Zac5_NlVCiUcHRA5SNg,1172
502
- orionis-0.428.0.dist-info/METADATA,sha256=4OYvok4BsiU9G8T-GxmzYGDJiuQUyc7w9e72KPAGJts,4772
503
- orionis-0.428.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
504
- orionis-0.428.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
505
- orionis-0.428.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
506
- orionis-0.428.0.dist-info/RECORD,,
488
+ orionis-0.430.0.dist-info/METADATA,sha256=XM0sOQfMEd407puXClRz6M7winIEwWxCu43ACClfA2k,4772
489
+ orionis-0.430.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
490
+ orionis-0.430.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
491
+ orionis-0.430.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
492
+ orionis-0.430.0.dist-info/RECORD,,
File without changes
@@ -1,36 +0,0 @@
1
- from orionis._contracts.console.command_filter import ICommandFilter
2
-
3
- class CommandFilter(ICommandFilter):
4
- """
5
- CommandFilter handles the exclusion of specific commands from output formatting.
6
-
7
- This class:
8
- - Determines whether a command should be excluded from output formatting based on a predefined list.
9
- - Can be extended or modified to support more advanced filtering if needed.
10
-
11
- Methods
12
- -------
13
- isExcluded(command: str) -> bool
14
- Checks if the given command is excluded from output formatting.
15
- """
16
-
17
- @staticmethod
18
- def isExcluded(command: str) -> bool:
19
- """
20
- Checks if the given command is in the excluded commands list.
21
-
22
- Parameters
23
- ----------
24
- command : str
25
- The command to check.
26
-
27
- Returns
28
- -------
29
- bool
30
- Returns True if the command is excluded from output formatting, False otherwise.
31
- """
32
- return command in [
33
- 'schedule:work', # Command to handle scheduled work
34
- 'help', # Command to show help information
35
- 'version', # Command to display version information
36
- ]
File without changes
@@ -1,76 +0,0 @@
1
- import os
2
- import shutil
3
- from orionis._console.base.command import BaseCommand
4
- from orionis._console.exceptions.cli_runtime_error import CLIOrionisRuntimeError
5
-
6
- class CacheClearCommand(BaseCommand):
7
- """
8
- Clears Python bytecode caches (__pycache__) within the project directory.
9
-
10
- This command recursively searches for and removes all `__pycache__` directories
11
- in the project folder to ensure that no stale bytecode files persist.
12
- """
13
-
14
- signature = 'cache:clear'
15
-
16
- description = 'Clears the project cache by removing all __pycache__ directories.'
17
-
18
- def __init__(self) -> None:
19
- """
20
- Initializes the command instance, setting the list of directories to exclude from the cache clearing process.
21
- """
22
- self.exclude_dirs = [
23
- 'venv',
24
- 'env',
25
- 'virtualenv',
26
- 'venv3',
27
- 'env3',
28
- 'venv2',
29
- 'env2',
30
- 'vendor',
31
- 'node_modules',
32
- 'environment'
33
- ]
34
-
35
- def handle(self) -> None:
36
- """
37
- Executes the cache clearing process.
38
-
39
- This method performs the following actions:
40
- - Recursively searches the project directory for `__pycache__` directories.
41
- - Deletes all found `__pycache__` directories and their contents.
42
- - Logs a success message if the process completes successfully, or an error message if an exception occurs.
43
- """
44
- try:
45
-
46
- # Get the base project path
47
- base_path = os.getcwd()
48
-
49
- # Normalize the base path to ensure consistent formatting
50
- base_path = os.path.normpath(base_path)
51
-
52
- # Recursively traverse directories starting from the base path
53
- for root, dirs, files in os.walk(base_path, topdown=True):
54
-
55
- # Skip common environment directories (e.g., venv, env, vendor, node_modules)
56
- for env_dir in self.exclude_dirs:
57
- if env_dir in dirs:
58
- dirs.remove(env_dir)
59
-
60
- # Check for __pycache__ directories
61
- if '__pycache__' in dirs:
62
- pycache_path = os.path.join(root, '__pycache__')
63
-
64
- # Attempt to remove the __pycache__ directory
65
- try:
66
- shutil.rmtree(pycache_path)
67
- except OSError as e:
68
- self.fail(f"Error removing {pycache_path}: {e}")
69
-
70
- # Log a success message once all caches are cleared
71
- self.success(message='The application cache has been successfully cleared.')
72
-
73
- except Exception as e:
74
-
75
- # Handle any unexpected error and display the error message
76
- raise CLIOrionisRuntimeError(f"An unexpected error occurred while clearing the cache: {e}") from e
@@ -1,70 +0,0 @@
1
- from orionis.metadata.framework import NAME
2
- from orionis._console.base.command import BaseCommand
3
- from orionis._console.exceptions.cli_runtime_error import CLIOrionisRuntimeError
4
- from orionis._contracts.application import IApplication
5
-
6
- class HelpCommand(BaseCommand):
7
- """
8
- Command class to display the list of available commands in the Orionis application.
9
- This command fetches all registered commands from the cache and presents them in a table format.
10
- """
11
-
12
- signature = "help"
13
-
14
- description = "Prints the list of available commands along with their descriptions."
15
-
16
- def __init__(self, app : IApplication):
17
- """
18
- Initialize the HelpCommand class.
19
-
20
- Parameters
21
- ----------
22
- app : IApplication
23
- The application instance that is passed to the command class.
24
- """
25
- self._commands : dict = app._commands if hasattr(app, '_commands') else {}
26
-
27
- def handle(self) -> None:
28
- """
29
- Execute the help command.
30
-
31
- This method retrieves all available commands from the cache, sorts them alphabetically,
32
- and displays them in a structured table format.
33
-
34
- Raises
35
- ------
36
- ValueError
37
- If an unexpected error occurs during execution, a ValueError is raised
38
- with the original exception message.
39
- """
40
- try:
41
-
42
- # Display the available commands
43
- self.newLine()
44
- self.textSuccessBold(f" ({str(NAME).upper()} CLI Interpreter) Available Commands: ")
45
-
46
- # Initialize an empty list to store the rows.
47
- rows = []
48
- for signature, command_data in self._commands.items():
49
- rows.append([
50
- signature,
51
- command_data['description'],
52
- 'Core Command' if 'orionis.console.commands' in command_data['concrete'].__module__ else 'User Command'
53
- ])
54
-
55
- # Sort commands alphabetically
56
- rows_sorted = sorted(rows, key=lambda x: x[0])
57
-
58
- # Display the commands in a table format
59
- self.table(
60
- ["Signature", "Description", "Type"],
61
- rows_sorted
62
- )
63
-
64
- # Add a new line after the table
65
- self.newLine()
66
-
67
- except Exception as e:
68
-
69
- # Handle any unexpected error and display the error message
70
- raise CLIOrionisRuntimeError(f"An unexpected error occurred: {e}") from e
@@ -1,55 +0,0 @@
1
- import importlib
2
- from orionis._console.base.command import BaseCommand
3
- from orionis._console.exceptions.cli_runtime_error import CLIOrionisRuntimeError
4
- from orionis._contracts.console.task_manager import ITaskManager
5
- from orionis._facades.commands.scheduler_facade import Schedule
6
-
7
- class ScheduleWorkCommand(BaseCommand):
8
- """
9
- Command class to handle scheduled tasks within the Orionis application.
10
-
11
- This command initializes the scheduling system, registers the schedule,
12
- and starts the execution of scheduled tasks.
13
- """
14
-
15
- signature = "schedule:work"
16
-
17
- description = "Starts the scheduled tasks."
18
-
19
- def __init__(self, schedule : Schedule) -> None:
20
- """
21
- Initialize a new instance of the ScheduleWorkCommand class.
22
-
23
- Args:
24
- schedule (ScheduleService): The schedule instance to use for scheduling tasks.
25
- """
26
- self.schedule : Schedule = schedule
27
-
28
- def handle(self) -> None:
29
- """
30
- Execute the scheduled tasks.
31
-
32
- This method initializes a Schedule instance, creates a TaskManager (Kernel),
33
- registers the schedule, and starts the execution of scheduled tasks.
34
-
35
- Raises
36
- ------
37
- RuntimeError
38
- If an unexpected error occurs during execution, a RuntimeError is raised
39
- with the original exception message.
40
- """
41
- try:
42
-
43
- # Create an instance of the TaskManager to manage the scheduling.
44
- tasks_manager = importlib.import_module("app.console.tasks_manager")
45
- TaskManager = getattr(tasks_manager, "TaskManager")
46
- kernel: ITaskManager = TaskManager()
47
- kernel.schedule(self.schedule)
48
-
49
- # Start running the scheduled tasks using the schedule runner.
50
- self.schedule.start()
51
-
52
- except Exception as e:
53
-
54
- # Handle any unexpected error and display the error message
55
- raise CLIOrionisRuntimeError(f"An unexpected error occurred: {e}") from e
@@ -1,31 +0,0 @@
1
- from orionis.metadata.framework import VERSION
2
- from orionis._console.base.command import BaseCommand
3
- from orionis._console.exceptions.cli_runtime_error import CLIOrionisRuntimeError
4
-
5
- class VersionCommand(BaseCommand):
6
- """
7
- Command class to display the current version of the Orionis framework.
8
-
9
- This command prints the version number of the framework in use.
10
- """
11
-
12
- signature = "version"
13
-
14
- description = "Prints the version of the framework in use."
15
-
16
- def handle(self) -> None:
17
- """
18
- Execute the version command.
19
-
20
- This method retrieves and prints the version of the Orionis framework.
21
-
22
- Raises
23
- ------
24
- ValueError
25
- If an unexpected error occurs during execution, a ValueError is raised
26
- with the original exception message.
27
- """
28
- try:
29
- self.textSuccessBold(f"Orionis Framework v{VERSION}")
30
- except Exception as e:
31
- raise CLIOrionisRuntimeError(f"An unexpected error occurred: {e}") from e
File without changes