orionis 0.1.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.
Files changed (133) hide show
  1. orionis/__init__.py +0 -0
  2. orionis/cli_manager.py +48 -0
  3. orionis/framework.py +45 -0
  4. orionis/luminate/__init__.py +0 -0
  5. orionis/luminate/app.py +0 -0
  6. orionis/luminate/bootstrap/__init__.py +0 -0
  7. orionis/luminate/bootstrap/parser.py +49 -0
  8. orionis/luminate/bootstrap/register.py +95 -0
  9. orionis/luminate/cache/__init__.py +0 -0
  10. orionis/luminate/cache/app/__init__.py +0 -0
  11. orionis/luminate/cache/app/config.py +96 -0
  12. orionis/luminate/cache/console/__init__.py +0 -0
  13. orionis/luminate/cache/console/commands.py +98 -0
  14. orionis/luminate/config/__init__.py +0 -0
  15. orionis/luminate/config/dataclass/__init__.py +0 -0
  16. orionis/luminate/config/dataclass/app.py +50 -0
  17. orionis/luminate/config/dataclass/auth.py +17 -0
  18. orionis/luminate/config/dataclass/cache.py +51 -0
  19. orionis/luminate/config/dataclass/cors.py +58 -0
  20. orionis/luminate/config/dataclass/database.py +203 -0
  21. orionis/luminate/config/dataclass/filesystems.py +102 -0
  22. orionis/luminate/config/dataclass/logging.py +107 -0
  23. orionis/luminate/config/dataclass/mail.py +81 -0
  24. orionis/luminate/config/dataclass/queue.py +63 -0
  25. orionis/luminate/config/dataclass/session.py +59 -0
  26. orionis/luminate/config/environment.py +110 -0
  27. orionis/luminate/config/sections.py +37 -0
  28. orionis/luminate/console/__init__.py +0 -0
  29. orionis/luminate/console/base/__init__.py +0 -0
  30. orionis/luminate/console/base/command.py +427 -0
  31. orionis/luminate/console/cache.py +132 -0
  32. orionis/luminate/console/command.py +40 -0
  33. orionis/luminate/console/command_filter.py +40 -0
  34. orionis/luminate/console/commands/__init__.py +0 -0
  35. orionis/luminate/console/commands/cache_clear.py +56 -0
  36. orionis/luminate/console/commands/help.py +59 -0
  37. orionis/luminate/console/commands/schedule_work.py +50 -0
  38. orionis/luminate/console/commands/tests.py +40 -0
  39. orionis/luminate/console/commands/version.py +39 -0
  40. orionis/luminate/console/exceptions/__init__.py +0 -0
  41. orionis/luminate/console/exceptions/cli_exception.py +125 -0
  42. orionis/luminate/console/kernel.py +32 -0
  43. orionis/luminate/console/output/__init__.py +0 -0
  44. orionis/luminate/console/output/console.py +426 -0
  45. orionis/luminate/console/output/executor.py +90 -0
  46. orionis/luminate/console/output/progress_bar.py +100 -0
  47. orionis/luminate/console/output/styles.py +95 -0
  48. orionis/luminate/console/parser.py +159 -0
  49. orionis/luminate/console/register.py +98 -0
  50. orionis/luminate/console/runner.py +126 -0
  51. orionis/luminate/console/scripts/__init__.py +0 -0
  52. orionis/luminate/console/scripts/management.py +94 -0
  53. orionis/luminate/console/tasks/__init__.py +0 -0
  54. orionis/luminate/console/tasks/scheduler.py +616 -0
  55. orionis/luminate/contracts/__init__.py +0 -0
  56. orionis/luminate/contracts/bootstrap/parser_interface.py +46 -0
  57. orionis/luminate/contracts/cache/__init__.py +0 -0
  58. orionis/luminate/contracts/cache/cache_commands_interface.py +69 -0
  59. orionis/luminate/contracts/config/__init__.py +0 -0
  60. orionis/luminate/contracts/config/config_interface.py +27 -0
  61. orionis/luminate/contracts/config/environment_interface.py +64 -0
  62. orionis/luminate/contracts/console/__init__.py +0 -0
  63. orionis/luminate/contracts/console/base_command_interface.py +448 -0
  64. orionis/luminate/contracts/console/cli_cache_interface.py +34 -0
  65. orionis/luminate/contracts/console/command_filter_interface.py +32 -0
  66. orionis/luminate/contracts/console/command_interface.py +36 -0
  67. orionis/luminate/contracts/console/console_interface.py +305 -0
  68. orionis/luminate/contracts/console/executor_interface.py +51 -0
  69. orionis/luminate/contracts/console/kernel_interface.py +32 -0
  70. orionis/luminate/contracts/console/management_interface.py +63 -0
  71. orionis/luminate/contracts/console/parser_interface.py +76 -0
  72. orionis/luminate/contracts/console/progress_bar_interface.py +66 -0
  73. orionis/luminate/contracts/console/register_interface.py +32 -0
  74. orionis/luminate/contracts/console/runner_interface.py +50 -0
  75. orionis/luminate/contracts/console/schedule_interface.py +317 -0
  76. orionis/luminate/contracts/console/task_manager_interface.py +37 -0
  77. orionis/luminate/contracts/facades/__init__.py +0 -0
  78. orionis/luminate/contracts/facades/env_interface.py +64 -0
  79. orionis/luminate/contracts/facades/log_interface.py +48 -0
  80. orionis/luminate/contracts/facades/paths_interface.py +141 -0
  81. orionis/luminate/contracts/facades/tests_interface.py +33 -0
  82. orionis/luminate/contracts/files/__init__.py +0 -0
  83. orionis/luminate/contracts/files/paths_interface.py +29 -0
  84. orionis/luminate/contracts/installer/__init__.py +0 -0
  85. orionis/luminate/contracts/installer/output_interface.py +125 -0
  86. orionis/luminate/contracts/installer/setup_interface.py +29 -0
  87. orionis/luminate/contracts/installer/upgrade_interface.py +24 -0
  88. orionis/luminate/contracts/log/__init__.py +0 -0
  89. orionis/luminate/contracts/log/logger_interface.py +33 -0
  90. orionis/luminate/contracts/pipelines/cli_pipeline_interface.py +84 -0
  91. orionis/luminate/contracts/publisher/__init__.py +0 -0
  92. orionis/luminate/contracts/publisher/pypi_publisher_interface.py +36 -0
  93. orionis/luminate/contracts/test/__init__.py +0 -0
  94. orionis/luminate/contracts/test/unit_test_interface.py +51 -0
  95. orionis/luminate/contracts/tools/__init__.py +0 -0
  96. orionis/luminate/contracts/tools/reflection_interface.py +343 -0
  97. orionis/luminate/contracts/tools/std_interface.py +56 -0
  98. orionis/luminate/facades/__init__.py +0 -0
  99. orionis/luminate/facades/environment.py +81 -0
  100. orionis/luminate/facades/log.py +56 -0
  101. orionis/luminate/facades/paths.py +268 -0
  102. orionis/luminate/facades/tests.py +48 -0
  103. orionis/luminate/files/__init__.py +0 -0
  104. orionis/luminate/files/paths.py +56 -0
  105. orionis/luminate/installer/__init__.py +0 -0
  106. orionis/luminate/installer/icon.ascii +11 -0
  107. orionis/luminate/installer/info.ascii +13 -0
  108. orionis/luminate/installer/output.py +188 -0
  109. orionis/luminate/installer/setup.py +191 -0
  110. orionis/luminate/installer/upgrade.py +42 -0
  111. orionis/luminate/log/__init__.py +0 -0
  112. orionis/luminate/log/logger.py +116 -0
  113. orionis/luminate/pipelines/__init__.py +0 -0
  114. orionis/luminate/pipelines/cli_pipeline.py +116 -0
  115. orionis/luminate/publisher/__init__.py +0 -0
  116. orionis/luminate/publisher/pypi.py +206 -0
  117. orionis/luminate/static/logos/flaskavel.png +0 -0
  118. orionis/luminate/test/__init__.py +0 -0
  119. orionis/luminate/test/exception.py +48 -0
  120. orionis/luminate/test/unit_test.py +108 -0
  121. orionis/luminate/tools/__init__.py +0 -0
  122. orionis/luminate/tools/reflection.py +390 -0
  123. orionis/luminate/tools/std.py +53 -0
  124. orionis-0.1.0.dist-info/LICENCE +21 -0
  125. orionis-0.1.0.dist-info/METADATA +27 -0
  126. orionis-0.1.0.dist-info/RECORD +133 -0
  127. orionis-0.1.0.dist-info/WHEEL +5 -0
  128. orionis-0.1.0.dist-info/entry_points.txt +2 -0
  129. orionis-0.1.0.dist-info/top_level.txt +2 -0
  130. tests/__init__.py +0 -0
  131. tests/tools/__init__.py +0 -0
  132. tests/tools/class_example.py +50 -0
  133. tests/tools/test_reflection.py +128 -0
@@ -0,0 +1,69 @@
1
+ from abc import ABC, abstractmethod
2
+
3
+ class ICacheCommands(ABC):
4
+ """
5
+ Interface for managing a cache of commands.
6
+
7
+ This interface ensures that any class implementing it will provide methods
8
+ for registering, unregistering, and retrieving commands.
9
+ """
10
+
11
+ @abstractmethod
12
+ def register(self, signature: str, description: str, instance):
13
+ """
14
+ Register a new command with its signature, description, and class instance.
15
+
16
+ Parameters
17
+ ----------
18
+ signature : str
19
+ The unique identifier (signature) for the command.
20
+ description : str
21
+ A brief description of what the command does.
22
+ instance : class
23
+ The class or callable instance that defines the command behavior.
24
+
25
+ Raises
26
+ ------
27
+ ValueError
28
+ If a command with the given signature already exists.
29
+ """
30
+ pass
31
+
32
+ @abstractmethod
33
+ def unregister(self, signature: str):
34
+ """
35
+ Unregister an existing command by its signature.
36
+
37
+ Parameters
38
+ ----------
39
+ signature : str
40
+ The unique identifier (signature) for the command to unregister.
41
+
42
+ Raises
43
+ ------
44
+ KeyError
45
+ If the command with the given signature does not exist.
46
+ """
47
+ pass
48
+
49
+ @abstractmethod
50
+ def get(self, signature: str):
51
+ """
52
+ Retrieve the information of a registered command by its signature.
53
+
54
+ Parameters
55
+ ----------
56
+ signature : str
57
+ The unique identifier (signature) for the command.
58
+
59
+ Returns
60
+ -------
61
+ dict
62
+ A dictionary containing the class, signature, and description of the command.
63
+
64
+ Raises
65
+ ------
66
+ KeyError
67
+ If the command with the given signature does not exist.
68
+ """
69
+ pass
File without changes
@@ -0,0 +1,27 @@
1
+ from abc import ABC
2
+ from dataclasses import dataclass
3
+
4
+ @dataclass
5
+ class EmptyData:
6
+ """
7
+ A placeholder dataclass that can be used as a default or empty configuration.
8
+ This class doesn't have any fields or data, but serves as a default value
9
+ for the 'config' attribute in classes implementing IConfig.
10
+ """
11
+ pass
12
+
13
+ class IConfig(ABC):
14
+ """
15
+ An abstract base class that defines an interface for classes that must have
16
+ a `config` attribute.
17
+
18
+ The subclass is required to implement the `config` attribute, which should be
19
+ a dataclass instance representing the configuration data.
20
+
21
+ Attributes
22
+ ----------
23
+ config : object
24
+ A dataclass instance representing the configuration.
25
+ """
26
+
27
+ config = EmptyData()
@@ -0,0 +1,64 @@
1
+ from abc import ABC, abstractmethod
2
+ from typing import Optional, Dict
3
+
4
+ class IEnvironment(ABC):
5
+ """
6
+ Interface for managing environment variables from a .env file.
7
+ """
8
+
9
+ @abstractmethod
10
+ def get(self, key: str, default: Optional[str] = None) -> Optional[str]:
11
+ """
12
+ Retrieve the value of an environment variable.
13
+
14
+ Parameters
15
+ ----------
16
+ key : str
17
+ The key of the environment variable.
18
+ default : Optional[str], optional
19
+ Default value if the key does not exist, by default None.
20
+
21
+ Returns
22
+ -------
23
+ Optional[str]
24
+ The value of the environment variable or the default value.
25
+ """
26
+ pass
27
+
28
+ @abstractmethod
29
+ def set(self, key: str, value: str) -> None:
30
+ """
31
+ Set the value of an environment variable in the .env file.
32
+
33
+ Parameters
34
+ ----------
35
+ key : str
36
+ The key of the environment variable.
37
+ value : str
38
+ The value to set.
39
+ """
40
+ pass
41
+
42
+ @abstractmethod
43
+ def unset(self, key: str) -> None:
44
+ """
45
+ Remove an environment variable from the .env file.
46
+
47
+ Parameters
48
+ ----------
49
+ key : str
50
+ The key of the environment variable to remove.
51
+ """
52
+ pass
53
+
54
+ @abstractmethod
55
+ def all(self) -> Dict[str, str]:
56
+ """
57
+ Retrieve all environment variable values from the .env file.
58
+
59
+ Returns
60
+ -------
61
+ Dict[str, str]
62
+ A dictionary of all environment variables and their values.
63
+ """
64
+ pass
File without changes
@@ -0,0 +1,448 @@
1
+ from abc import ABC, abstractmethod
2
+ from typing import List
3
+
4
+ from orionis.luminate.console.output.progress_bar import ProgressBar
5
+
6
+ class IBaseCommand(ABC):
7
+ """
8
+ Interface for console output commands. This defines the methods that must be implemented in a command class.
9
+ """
10
+
11
+ @abstractmethod
12
+ def success(self, message: str = '', timestamp: bool = True) -> None:
13
+ """
14
+ Prints a success message with a green background.
15
+
16
+ Parameters
17
+ ----------
18
+ message : str, optional
19
+ The message to display (default is an empty string).
20
+ timestamp : bool, optional
21
+ Whether to include a timestamp (default is True).
22
+ """
23
+ pass
24
+
25
+ @abstractmethod
26
+ def textSuccess(self, message: str = '') -> None:
27
+ """
28
+ Prints a success message in green.
29
+
30
+ Parameters
31
+ ----------
32
+ message : str, optional
33
+ The message to display (default is an empty string).
34
+ """
35
+ pass
36
+
37
+ @abstractmethod
38
+ def textSuccessBold(self, message: str = '') -> None:
39
+ """
40
+ Prints a bold success message in green.
41
+
42
+ Parameters
43
+ ----------
44
+ message : str, optional
45
+ The message to display (default is an empty string).
46
+ """
47
+ pass
48
+
49
+ @abstractmethod
50
+ def info(self, message: str = '', timestamp: bool = True) -> None:
51
+ """
52
+ Prints an informational message with a blue background.
53
+
54
+ Parameters
55
+ ----------
56
+ message : str, optional
57
+ The message to display (default is an empty string).
58
+ timestamp : bool, optional
59
+ Whether to include a timestamp (default is True).
60
+ """
61
+ pass
62
+
63
+ @abstractmethod
64
+ def textInfo(self, message: str = '') -> None:
65
+ """
66
+ Prints an informational message in blue.
67
+
68
+ Parameters
69
+ ----------
70
+ message : str, optional
71
+ The message to display (default is an empty string).
72
+ """
73
+ pass
74
+
75
+ @abstractmethod
76
+ def textInfoBold(self, message: str = '') -> None:
77
+ """
78
+ Prints a bold informational message in blue.
79
+
80
+ Parameters
81
+ ----------
82
+ message : str, optional
83
+ The message to display (default is an empty string).
84
+ """
85
+ pass
86
+
87
+ @abstractmethod
88
+ def warning(self, message: str = '', timestamp: bool = True) -> None:
89
+ """
90
+ Prints a warning message with a yellow background.
91
+
92
+ Parameters
93
+ ----------
94
+ message : str, optional
95
+ The message to display (default is an empty string).
96
+ timestamp : bool, optional
97
+ Whether to include a timestamp (default is True).
98
+ """
99
+ pass
100
+
101
+ @abstractmethod
102
+ def textWarning(self, message: str = '') -> None:
103
+ """
104
+ Prints a warning message in yellow.
105
+
106
+ Parameters
107
+ ----------
108
+ message : str, optional
109
+ The message to display (default is an empty string).
110
+ """
111
+ pass
112
+
113
+ @abstractmethod
114
+ def textWarningBold(self, message: str = '') -> None:
115
+ """
116
+ Prints a bold warning message in yellow.
117
+
118
+ Parameters
119
+ ----------
120
+ message : str, optional
121
+ The message to display (default is an empty string).
122
+ """
123
+ pass
124
+
125
+ @abstractmethod
126
+ def fail(self, message: str = '', timestamp: bool = True) -> None:
127
+ """
128
+ Prints a failure message with a red background.
129
+
130
+ Parameters
131
+ ----------
132
+ message : str, optional
133
+ The message to display (default is an empty string).
134
+ timestamp : bool, optional
135
+ Whether to include a timestamp (default is True).
136
+ """
137
+ pass
138
+
139
+ @abstractmethod
140
+ def error(self, message: str = '', timestamp: bool = True) -> None:
141
+ """
142
+ Prints an error message with a red background.
143
+
144
+ Parameters
145
+ ----------
146
+ message : str, optional
147
+ The message to display (default is an empty string).
148
+ timestamp : bool, optional
149
+ Whether to include a timestamp (default is True).
150
+ """
151
+ pass
152
+
153
+ @abstractmethod
154
+ def textError(self, message: str = '') -> None:
155
+ """
156
+ Prints an error message in red.
157
+
158
+ Parameters
159
+ ----------
160
+ message : str, optional
161
+ The message to display (default is an empty string).
162
+ """
163
+ pass
164
+
165
+ @abstractmethod
166
+ def textErrorBold(self, message: str = '') -> None:
167
+ """
168
+ Prints a bold error message in red.
169
+
170
+ Parameters
171
+ ----------
172
+ message : str, optional
173
+ The message to display (default is an empty string).
174
+ """
175
+ pass
176
+
177
+ @abstractmethod
178
+ def textMuted(self, message: str = '') -> None:
179
+ """
180
+ Prints a muted (gray) message.
181
+
182
+ Parameters
183
+ ----------
184
+ message : str, optional
185
+ The message to display (default is an empty string).
186
+ """
187
+ pass
188
+
189
+ @abstractmethod
190
+ def textMutedBold(self, message: str = '') -> None:
191
+ """
192
+ Prints a bold muted (gray) message.
193
+
194
+ Parameters
195
+ ----------
196
+ message : str, optional
197
+ The message to display (default is an empty string).
198
+ """
199
+ pass
200
+
201
+ @abstractmethod
202
+ def textUnderline(self, message: str = '') -> None:
203
+ """
204
+ Prints an underlined message.
205
+
206
+ Parameters
207
+ ----------
208
+ message : str, optional
209
+ The message to display (default is an empty string).
210
+ """
211
+ pass
212
+
213
+ @abstractmethod
214
+ def clear(self) -> None:
215
+ """
216
+ Clears the console screen.
217
+ """
218
+ pass
219
+
220
+ @abstractmethod
221
+ def clearLine(self) -> None:
222
+ """
223
+ Clears the current console line.
224
+ """
225
+ pass
226
+
227
+ @abstractmethod
228
+ def line(self, message: str = '') -> None:
229
+ """
230
+ Prints a line of text.
231
+
232
+ Parameters
233
+ ----------
234
+ message : str, optional
235
+ The message to display (default is an empty string).
236
+ """
237
+ pass
238
+
239
+ @abstractmethod
240
+ def newLine(self, count: int = 1) -> None:
241
+ """
242
+ Prints multiple new lines.
243
+
244
+ Parameters
245
+ ----------
246
+ count : int, optional
247
+ The number of new lines to print (default is 1).
248
+ """
249
+ pass
250
+
251
+ @abstractmethod
252
+ def write(self, message: str = '') -> None:
253
+ """
254
+ Prints a message without moving to the next line.
255
+
256
+ Parameters
257
+ ----------
258
+ message : str, optional
259
+ The message to display (default is an empty string).
260
+ """
261
+ pass
262
+
263
+ @abstractmethod
264
+ def writeLine(self, message: str = '') -> None:
265
+ """
266
+ Prints a message and moves to the next line.
267
+
268
+ Parameters
269
+ ----------
270
+ message : str, optional
271
+ The message to display (default is an empty string).
272
+ """
273
+ pass
274
+
275
+ @abstractmethod
276
+ def ask(self, question: str) -> str:
277
+ """
278
+ Prompts the user for input and returns the response.
279
+
280
+ Parameters
281
+ ----------
282
+ question : str
283
+ The question to ask the user.
284
+
285
+ Returns
286
+ -------
287
+ str
288
+ The user's input.
289
+ """
290
+ pass
291
+
292
+ @abstractmethod
293
+ def confirm(self, question: str, default: bool = False) -> bool:
294
+ """
295
+ Asks a confirmation question and returns True/False based on the user's response.
296
+
297
+ Parameters
298
+ ----------
299
+ question : str
300
+ The confirmation question to ask.
301
+ default : bool, optional
302
+ The default response if the user presses Enter without typing a response (default is False).
303
+
304
+ Returns
305
+ -------
306
+ bool
307
+ The user's response.
308
+ """
309
+ pass
310
+
311
+ @abstractmethod
312
+ def secret(self, question: str) -> str:
313
+ """
314
+ Prompts for hidden input (e.g., password).
315
+
316
+ Parameters
317
+ ----------
318
+ question : str
319
+ The prompt to ask the user.
320
+
321
+ Returns
322
+ -------
323
+ str
324
+ The user's hidden input.
325
+ """
326
+ pass
327
+
328
+ @abstractmethod
329
+ def table(self, headers: List[str], rows: List[List[str]]) -> None:
330
+ """
331
+ Prints a formatted table in the console.
332
+
333
+ Parameters
334
+ ----------
335
+ headers : list of str
336
+ The column headers for the table.
337
+ rows : list of list of str
338
+ The rows of the table.
339
+
340
+ Raises
341
+ ------
342
+ ValueError
343
+ If headers or rows are empty.
344
+ """
345
+ pass
346
+
347
+ @abstractmethod
348
+ def anticipate(self, question: str, options: List[str], default=None) -> str:
349
+ """
350
+ Provides autocomplete suggestions for user input.
351
+
352
+ Parameters
353
+ ----------
354
+ question : str
355
+ The prompt for the user.
356
+ options : list of str
357
+ The list of possible options for autocomplete.
358
+ default : str, optional
359
+ The default value if no matching option is found (default is None).
360
+
361
+ Returns
362
+ -------
363
+ str
364
+ The chosen option or the default value.
365
+ """
366
+ pass
367
+
368
+ @abstractmethod
369
+ def choice(self, question: str, choices: List[str], default_index: int = 0) -> str:
370
+ """
371
+ Prompts the user to select a choice from a list.
372
+
373
+ Parameters
374
+ ----------
375
+ question : str
376
+ The prompt for the user.
377
+ choices : list of str
378
+ The list of available choices.
379
+ default_index : int, optional
380
+ The index of the default choice (default is 0).
381
+
382
+ Returns
383
+ -------
384
+ str
385
+ The selected choice.
386
+
387
+ Raises
388
+ ------
389
+ ValueError
390
+ If `default_index` is out of the range of choices.
391
+ """
392
+ pass
393
+
394
+ @abstractmethod
395
+ def createProgressBar(self, total: int = 100, width: int = 50) -> ProgressBar:
396
+ """
397
+ Creates and returns a new progress bar.
398
+
399
+ This method initializes a `ProgressBar` object with the specified total and width.
400
+
401
+ Parameters
402
+ ----------
403
+ total : int, optional
404
+ The total number of steps for the progress bar. Default is 100.
405
+ width : int, optional
406
+ The width (in characters) of the progress bar. Default is 50.
407
+
408
+ Returns
409
+ -------
410
+ ProgressBar
411
+ A new instance of the `ProgressBar` class, initialized with the specified `total` and `width`.
412
+
413
+ Notes
414
+ -----
415
+ The progress bar can be used to visually track the progress of a task.
416
+ The `total` parameter represents the number of steps to complete the task,
417
+ and the `width` parameter controls the number of characters used to represent the progress bar in the console.
418
+ """
419
+ pass
420
+
421
+ @abstractmethod
422
+ def setArgs(self, args) -> None:
423
+ """
424
+ Abstract method to define the logic of setting command arguments.
425
+
426
+ Parameters
427
+ ----------
428
+ args : argparse.Namespace
429
+ Contain the arguments to be set for the command.
430
+ """
431
+ pass
432
+
433
+ @abstractmethod
434
+ def handle(self, *args, **kwargs):
435
+ """
436
+ Abstract method to define the logic of the command.
437
+
438
+ This method must be overridden in subclasses.
439
+
440
+ Arguments:
441
+ *args: A list of variable-length arguments.
442
+ **kwargs: Arbitrary keyword arguments.
443
+
444
+ Raises:
445
+ NotImplementedError: If the method is not implemented in a subclass. This ensures that all command classes
446
+ adhere to the expected structure.
447
+ """
448
+ pass
@@ -0,0 +1,34 @@
1
+ from abc import ABC, abstractmethod
2
+ from orionis.luminate.cache.console.commands import CacheCommands
3
+
4
+ class ICLICache(ABC):
5
+ """
6
+ Interface for CLICache, defining the required methods for managing command caching.
7
+
8
+ This interface enforces a contract for any class that implements caching functionality
9
+ for command execution within the framework.
10
+ """
11
+
12
+ @abstractmethod
13
+ def _load_commands(self) -> None:
14
+ """
15
+ Loads command modules from predefined directories.
16
+
17
+ This method should traverse specified directories, locate Python files, and import them dynamically.
18
+ Implementations should ensure that only relevant directories are processed.
19
+ """
20
+ pass
21
+
22
+ @abstractmethod
23
+ def getCommands(self) -> CacheCommands:
24
+ """
25
+ Returns the instance of CacheCommands containing the command cache.
26
+
27
+ This method provides access to the CacheCommands instance, which holds the cached commands.
28
+
29
+ Returns
30
+ -------
31
+ CacheCommands
32
+ The instance of CacheCommands that holds the cached commands.
33
+ """
34
+ pass
@@ -0,0 +1,32 @@
1
+ from abc import ABC, abstractmethod
2
+
3
+ class ICommandFilter(ABC):
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
+ @abstractmethod
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
+ pass