argenta 1.1.1__py3-none-any.whl → 1.1.2__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.
- argenta/__init__.py +4 -8
- argenta/app/models.py +140 -65
- argenta/di/__init__.py +2 -0
- argenta/di/integration.py +45 -0
- argenta/di/providers.py +14 -0
- argenta/orchestrator/__init__.py +2 -6
- argenta/orchestrator/argparser/__init__.py +3 -6
- argenta/orchestrator/argparser/arguments/__init__.py +3 -3
- argenta/orchestrator/argparser/arguments/models.py +59 -39
- argenta/orchestrator/argparser/entity.py +53 -14
- argenta/orchestrator/entity.py +19 -14
- argenta/response/entity.py +7 -2
- argenta/router/command_handler/entity.py +5 -3
- argenta/router/entity.py +34 -33
- argenta/router/exceptions.py +3 -9
- {argenta-1.1.1.dist-info → argenta-1.1.2.dist-info}/METADATA +3 -2
- {argenta-1.1.1.dist-info → argenta-1.1.2.dist-info}/RECORD +19 -16
- {argenta-1.1.1.dist-info → argenta-1.1.2.dist-info}/WHEEL +0 -0
- {argenta-1.1.1.dist-info → argenta-1.1.2.dist-info}/licenses/LICENSE +0 -0
argenta/__init__.py
CHANGED
@@ -1,10 +1,6 @@
|
|
1
|
-
__all__ = [
|
2
|
-
'App',
|
3
|
-
'Orchestrator',
|
4
|
-
'Router',
|
5
|
-
]
|
1
|
+
__all__ = ["App", "Orchestrator", "Router"]
|
6
2
|
|
7
3
|
|
8
|
-
from argenta.
|
9
|
-
from argenta.
|
10
|
-
from argenta.router import Router
|
4
|
+
from argenta.orchestrator.entity import Orchestrator
|
5
|
+
from argenta.app.models import App
|
6
|
+
from argenta.router.entity import Router
|
argenta/app/models.py
CHANGED
@@ -31,17 +31,21 @@ Matches: TypeAlias = list[str] | list[Never]
|
|
31
31
|
|
32
32
|
|
33
33
|
class BaseApp:
|
34
|
-
def __init__(
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
34
|
+
def __init__(
|
35
|
+
self,
|
36
|
+
*,
|
37
|
+
prompt: str,
|
38
|
+
initial_message: str,
|
39
|
+
farewell_message: str,
|
40
|
+
exit_command: Command,
|
41
|
+
system_router_title: str | None,
|
42
|
+
ignore_command_register: bool,
|
43
|
+
dividing_line: StaticDividingLine | DynamicDividingLine,
|
44
|
+
repeat_command_groups: bool,
|
45
|
+
override_system_messages: bool,
|
46
|
+
autocompleter: AutoCompleter,
|
47
|
+
print_func: Printer,
|
48
|
+
) -> None:
|
45
49
|
self._prompt: str = prompt
|
46
50
|
self._print_func: Printer = print_func
|
47
51
|
self._exit_command: Command = exit_command
|
@@ -55,22 +59,40 @@ class BaseApp:
|
|
55
59
|
self._farewell_message: str = farewell_message
|
56
60
|
self._initial_message: str = initial_message
|
57
61
|
|
58
|
-
self._description_message_gen: DescriptionMessageGenerator =
|
59
|
-
|
62
|
+
self._description_message_gen: DescriptionMessageGenerator = (
|
63
|
+
lambda command, description: f"{command} *=*=* {description}"
|
64
|
+
)
|
65
|
+
self.registered_routers: RegisteredRouters = RegisteredRouters()
|
60
66
|
self._messages_on_startup: list[str] = []
|
61
67
|
|
62
68
|
self._matching_lower_triggers_with_routers: dict[str, Router] = {}
|
63
69
|
self._matching_default_triggers_with_routers: dict[str, Router] = {}
|
64
70
|
|
65
|
-
self._current_matching_triggers_with_routers: dict[str, Router] =
|
71
|
+
self._current_matching_triggers_with_routers: dict[str, Router] = (
|
72
|
+
self._matching_lower_triggers_with_routers
|
73
|
+
if self._ignore_command_register
|
74
|
+
else self._matching_default_triggers_with_routers
|
75
|
+
)
|
66
76
|
|
67
|
-
self._incorrect_input_syntax_handler: NonStandardBehaviorHandler[str] =
|
68
|
-
|
69
|
-
|
70
|
-
self.
|
71
|
-
|
77
|
+
self._incorrect_input_syntax_handler: NonStandardBehaviorHandler[str] = (
|
78
|
+
lambda _: print_func(f"Incorrect flag syntax: {_}")
|
79
|
+
)
|
80
|
+
self._repeated_input_flags_handler: NonStandardBehaviorHandler[str] = (
|
81
|
+
lambda _: print_func(f"Repeated input flags: {_}")
|
82
|
+
)
|
83
|
+
self._empty_input_command_handler: EmptyCommandHandler = lambda: print_func(
|
84
|
+
"Empty input command"
|
85
|
+
)
|
86
|
+
self._unknown_command_handler: NonStandardBehaviorHandler[InputCommand] = (
|
87
|
+
lambda _: print_func(f"Unknown command: {_.trigger}")
|
88
|
+
)
|
89
|
+
self._exit_command_handler: NonStandardBehaviorHandler[Response] = (
|
90
|
+
lambda _: print_func(self._farewell_message)
|
91
|
+
)
|
72
92
|
|
73
|
-
def set_description_message_pattern(
|
93
|
+
def set_description_message_pattern(
|
94
|
+
self, _: DescriptionMessageGenerator, /
|
95
|
+
) -> None:
|
74
96
|
"""
|
75
97
|
Public. Sets the output pattern of the available commands
|
76
98
|
:param _: output pattern of the available commands
|
@@ -78,7 +100,9 @@ class BaseApp:
|
|
78
100
|
"""
|
79
101
|
self._description_message_gen = _
|
80
102
|
|
81
|
-
def set_incorrect_input_syntax_handler(
|
103
|
+
def set_incorrect_input_syntax_handler(
|
104
|
+
self, _: NonStandardBehaviorHandler[str], /
|
105
|
+
) -> None:
|
82
106
|
"""
|
83
107
|
Public. Sets the handler for incorrect flags when entering a command
|
84
108
|
:param _: handler for incorrect flags when entering a command
|
@@ -86,7 +110,9 @@ class BaseApp:
|
|
86
110
|
"""
|
87
111
|
self._incorrect_input_syntax_handler = _
|
88
112
|
|
89
|
-
def set_repeated_input_flags_handler(
|
113
|
+
def set_repeated_input_flags_handler(
|
114
|
+
self, _: NonStandardBehaviorHandler[str], /
|
115
|
+
) -> None:
|
90
116
|
"""
|
91
117
|
Public. Sets the handler for repeated flags when entering a command
|
92
118
|
:param _: handler for repeated flags when entering a command
|
@@ -94,7 +120,9 @@ class BaseApp:
|
|
94
120
|
"""
|
95
121
|
self._repeated_input_flags_handler = _
|
96
122
|
|
97
|
-
def set_unknown_command_handler(
|
123
|
+
def set_unknown_command_handler(
|
124
|
+
self, _: NonStandardBehaviorHandler[InputCommand], /
|
125
|
+
) -> None:
|
98
126
|
"""
|
99
127
|
Public. Sets the handler for unknown commands when entering a command
|
100
128
|
:param _: handler for unknown commands when entering a command
|
@@ -110,7 +138,9 @@ class BaseApp:
|
|
110
138
|
"""
|
111
139
|
self._empty_input_command_handler = _
|
112
140
|
|
113
|
-
def set_exit_command_handler(
|
141
|
+
def set_exit_command_handler(
|
142
|
+
self, _: NonStandardBehaviorHandler[Response], /
|
143
|
+
) -> None:
|
114
144
|
"""
|
115
145
|
Public. Sets the handler for exit command when entering a command
|
116
146
|
:param _: handler for exit command when entering a command
|
@@ -123,7 +153,7 @@ class BaseApp:
|
|
123
153
|
Private. Prints the description of the available commands
|
124
154
|
:return: None
|
125
155
|
"""
|
126
|
-
for registered_router in self.
|
156
|
+
for registered_router in self.registered_routers:
|
127
157
|
if registered_router.title:
|
128
158
|
self._print_func(registered_router.title)
|
129
159
|
for command_handler in registered_router.command_handlers:
|
@@ -164,14 +194,18 @@ class BaseApp:
|
|
164
194
|
length=max_length_line, is_override=self._override_system_messages
|
165
195
|
)
|
166
196
|
)
|
167
|
-
|
168
|
-
elif isinstance(self._dividing_line, StaticDividingLine):
|
197
|
+
|
198
|
+
elif isinstance(self._dividing_line, StaticDividingLine): # pyright: ignore[reportUnnecessaryIsInstance]
|
169
199
|
self._print_func(
|
170
|
-
self._dividing_line.get_full_static_line(
|
200
|
+
self._dividing_line.get_full_static_line(
|
201
|
+
is_override=self._override_system_messages
|
202
|
+
)
|
171
203
|
)
|
172
204
|
print(text.strip("\n"))
|
173
205
|
self._print_func(
|
174
|
-
self._dividing_line.get_full_static_line(
|
206
|
+
self._dividing_line.get_full_static_line(
|
207
|
+
is_override=self._override_system_messages
|
208
|
+
)
|
175
209
|
)
|
176
210
|
|
177
211
|
else:
|
@@ -186,13 +220,9 @@ class BaseApp:
|
|
186
220
|
trigger = command.trigger
|
187
221
|
exit_trigger = self._exit_command.trigger
|
188
222
|
if self._ignore_command_register:
|
189
|
-
if (
|
190
|
-
trigger.lower() == exit_trigger.lower()
|
191
|
-
):
|
223
|
+
if trigger.lower() == exit_trigger.lower():
|
192
224
|
return True
|
193
|
-
elif trigger.lower() in [
|
194
|
-
x.lower() for x in self._exit_command.aliases
|
195
|
-
]:
|
225
|
+
elif trigger.lower() in [x.lower() for x in self._exit_command.aliases]:
|
196
226
|
return True
|
197
227
|
else:
|
198
228
|
if trigger == exit_trigger:
|
@@ -209,16 +239,18 @@ class BaseApp:
|
|
209
239
|
"""
|
210
240
|
input_command_trigger = command.trigger
|
211
241
|
if self._ignore_command_register:
|
212
|
-
if input_command_trigger.lower() in list(
|
242
|
+
if input_command_trigger.lower() in list(
|
243
|
+
self._current_matching_triggers_with_routers.keys()
|
244
|
+
):
|
213
245
|
return False
|
214
246
|
else:
|
215
|
-
if input_command_trigger in list(
|
247
|
+
if input_command_trigger in list(
|
248
|
+
self._current_matching_triggers_with_routers.keys()
|
249
|
+
):
|
216
250
|
return False
|
217
251
|
return True
|
218
252
|
|
219
|
-
def _error_handler(
|
220
|
-
self, error: InputCommandException, raw_command: str
|
221
|
-
) -> None:
|
253
|
+
def _error_handler(self, error: InputCommandException, raw_command: str) -> None:
|
222
254
|
"""
|
223
255
|
Private. Handles parsing errors of the entered command
|
224
256
|
:param error: error being handled
|
@@ -243,13 +275,13 @@ class BaseApp:
|
|
243
275
|
def _(response: Response) -> None:
|
244
276
|
self._exit_command_handler(response)
|
245
277
|
|
246
|
-
if system_router not in self.
|
278
|
+
if system_router not in self.registered_routers.registered_routers:
|
247
279
|
system_router.command_register_ignore = self._ignore_command_register
|
248
|
-
self.
|
280
|
+
self.registered_routers.add_registered_router(system_router)
|
249
281
|
|
250
282
|
def _most_similar_command(self, unknown_command: str) -> str | None:
|
251
283
|
all_commands = list(self._current_matching_triggers_with_routers.keys())
|
252
|
-
|
284
|
+
|
253
285
|
matches_startswith_unknown_command: Matches = sorted(
|
254
286
|
cmd for cmd in all_commands if cmd.startswith(unknown_command)
|
255
287
|
)
|
@@ -272,26 +304,36 @@ class BaseApp:
|
|
272
304
|
:return: None
|
273
305
|
"""
|
274
306
|
self._prompt = f"[italic dim bold]{self._prompt}"
|
275
|
-
self._initial_message = (
|
307
|
+
self._initial_message = (
|
308
|
+
"\n" + f"[bold red]{text2art(self._initial_message, font='tarty1')}" + "\n"
|
309
|
+
)
|
276
310
|
self._farewell_message = (
|
277
|
-
"[bold red]\n\n"
|
278
|
-
str(text2art(self._farewell_message, font="chanky"))
|
279
|
-
"\n[/bold red]\n"
|
280
|
-
"[red i]github.com/koloideal/Argenta[/red i] | [red bold i]made by kolo[/red bold i]\n"
|
311
|
+
"[bold red]\n\n"
|
312
|
+
+ str(text2art(self._farewell_message, font="chanky")) # pyright: ignore[reportUnknownArgumentType]
|
313
|
+
+ "\n[/bold red]\n"
|
314
|
+
+ "[red i]github.com/koloideal/Argenta[/red i] | [red bold i]made by kolo[/red bold i]\n"
|
281
315
|
)
|
282
316
|
self._description_message_gen = lambda command, description: (
|
283
317
|
f"[bold red]{escape('[' + command + ']')}[/bold red] "
|
284
318
|
f"[blue dim]*=*=*[/blue dim] "
|
285
319
|
f"[bold yellow italic]{escape(description)}"
|
286
320
|
)
|
287
|
-
self._incorrect_input_syntax_handler = lambda raw_command: self._print_func(
|
288
|
-
|
289
|
-
|
321
|
+
self._incorrect_input_syntax_handler = lambda raw_command: self._print_func(
|
322
|
+
f"[red bold]Incorrect flag syntax: {escape(raw_command)}"
|
323
|
+
)
|
324
|
+
self._repeated_input_flags_handler = lambda raw_command: self._print_func(
|
325
|
+
f"[red bold]Repeated input flags: {escape(raw_command)}"
|
326
|
+
)
|
327
|
+
self._empty_input_command_handler = lambda: self._print_func(
|
328
|
+
"[red bold]Empty input command"
|
329
|
+
)
|
290
330
|
|
291
331
|
def unknown_command_handler(command: InputCommand) -> None:
|
292
332
|
cmd_trg: str = command.trigger
|
293
333
|
mst_sim_cmd: str | None = self._most_similar_command(cmd_trg)
|
294
|
-
first_part_of_text =
|
334
|
+
first_part_of_text = (
|
335
|
+
f"[red]Unknown command:[/red] [blue]{escape(cmd_trg)}[/blue]"
|
336
|
+
)
|
295
337
|
second_part_of_text = (
|
296
338
|
("[red], most similar:[/red] " + ("[blue]" + mst_sim_cmd + "[/blue]"))
|
297
339
|
if mst_sim_cmd
|
@@ -308,21 +350,27 @@ class BaseApp:
|
|
308
350
|
"""
|
309
351
|
self._setup_system_router()
|
310
352
|
|
311
|
-
for router_entity in self.
|
353
|
+
for router_entity in self.registered_routers:
|
312
354
|
router_triggers = router_entity.triggers
|
313
355
|
router_aliases = router_entity.aliases
|
314
356
|
combined = router_triggers + router_aliases
|
315
357
|
|
316
358
|
for trigger in combined:
|
317
359
|
self._matching_default_triggers_with_routers[trigger] = router_entity
|
318
|
-
self._matching_lower_triggers_with_routers[trigger.lower()] =
|
360
|
+
self._matching_lower_triggers_with_routers[trigger.lower()] = (
|
361
|
+
router_entity
|
362
|
+
)
|
319
363
|
|
320
|
-
self._autocompleter.initial_setup(
|
364
|
+
self._autocompleter.initial_setup(
|
365
|
+
list(self._current_matching_triggers_with_routers.keys())
|
366
|
+
)
|
321
367
|
|
322
368
|
seen = {}
|
323
369
|
for item in list(self._current_matching_triggers_with_routers.keys()):
|
324
370
|
if item in seen:
|
325
|
-
Console().print(
|
371
|
+
Console().print(
|
372
|
+
f"\n[b red]WARNING:[/b red] Overlapping trigger or alias: [b blue]{item}[/b blue]"
|
373
|
+
)
|
326
374
|
else:
|
327
375
|
seen[item] = True
|
328
376
|
|
@@ -349,7 +397,8 @@ DEFAULT_EXIT_COMMAND: Command = Command("Q", description="Exit command")
|
|
349
397
|
|
350
398
|
class App(BaseApp):
|
351
399
|
def __init__(
|
352
|
-
self,
|
400
|
+
self,
|
401
|
+
*,
|
353
402
|
prompt: str = "What do you want to do?\n\n",
|
354
403
|
initial_message: str = "Argenta\n",
|
355
404
|
farewell_message: str = "\nSee you\n",
|
@@ -405,7 +454,9 @@ class App(BaseApp):
|
|
405
454
|
raw_command: str = Console().input(self._prompt)
|
406
455
|
|
407
456
|
try:
|
408
|
-
input_command: InputCommand = InputCommand.parse(
|
457
|
+
input_command: InputCommand = InputCommand.parse(
|
458
|
+
raw_command=raw_command
|
459
|
+
)
|
409
460
|
except InputCommandException as error:
|
410
461
|
with redirect_stdout(io.StringIO()) as stderr:
|
411
462
|
self._error_handler(error, raw_command)
|
@@ -415,7 +466,9 @@ class App(BaseApp):
|
|
415
466
|
|
416
467
|
if self._is_exit_command(input_command):
|
417
468
|
system_router.finds_appropriate_handler(input_command)
|
418
|
-
self._autocompleter.exit_setup(
|
469
|
+
self._autocompleter.exit_setup(
|
470
|
+
list(self._current_matching_triggers_with_routers.keys())
|
471
|
+
)
|
419
472
|
return
|
420
473
|
|
421
474
|
if self._is_unknown_command(input_command):
|
@@ -425,18 +478,40 @@ class App(BaseApp):
|
|
425
478
|
self._print_framed_text(stdout_res)
|
426
479
|
continue
|
427
480
|
|
428
|
-
processing_router = self._current_matching_triggers_with_routers[
|
481
|
+
processing_router = self._current_matching_triggers_with_routers[
|
482
|
+
input_command.trigger.lower()
|
483
|
+
]
|
429
484
|
|
430
485
|
if processing_router.disable_redirect_stdout:
|
431
486
|
if isinstance(self._dividing_line, StaticDividingLine):
|
432
|
-
self._print_func(
|
487
|
+
self._print_func(
|
488
|
+
self._dividing_line.get_full_static_line(
|
489
|
+
is_override=self._override_system_messages
|
490
|
+
)
|
491
|
+
)
|
433
492
|
processing_router.finds_appropriate_handler(input_command)
|
434
|
-
self._print_func(
|
493
|
+
self._print_func(
|
494
|
+
self._dividing_line.get_full_static_line(
|
495
|
+
is_override=self._override_system_messages
|
496
|
+
)
|
497
|
+
)
|
435
498
|
else:
|
436
499
|
dividing_line_unit_part: str = self._dividing_line.get_unit_part()
|
437
|
-
self._print_func(
|
500
|
+
self._print_func(
|
501
|
+
StaticDividingLine(
|
502
|
+
dividing_line_unit_part
|
503
|
+
).get_full_static_line(
|
504
|
+
is_override=self._override_system_messages
|
505
|
+
)
|
506
|
+
)
|
438
507
|
processing_router.finds_appropriate_handler(input_command)
|
439
|
-
self._print_func(
|
508
|
+
self._print_func(
|
509
|
+
StaticDividingLine(
|
510
|
+
dividing_line_unit_part
|
511
|
+
).get_full_static_line(
|
512
|
+
is_override=self._override_system_messages
|
513
|
+
)
|
514
|
+
)
|
440
515
|
else:
|
441
516
|
with redirect_stdout(io.StringIO()) as stdout:
|
442
517
|
processing_router.finds_appropriate_handler(input_command)
|
@@ -451,7 +526,7 @@ class App(BaseApp):
|
|
451
526
|
:return: None
|
452
527
|
"""
|
453
528
|
router.command_register_ignore = self._ignore_command_register
|
454
|
-
self.
|
529
|
+
self.registered_routers.add_registered_router(router)
|
455
530
|
|
456
531
|
def include_routers(self, *routers: Router) -> None:
|
457
532
|
"""
|
argenta/di/__init__.py
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
__all__ = ["inject", "setup_dishka", "FromDishka"]
|
2
|
+
|
3
|
+
from typing import Any, Callable, TypeVar
|
4
|
+
|
5
|
+
from dishka import Container, FromDishka
|
6
|
+
from dishka.integrations.base import wrap_injection, is_dishka_injected
|
7
|
+
|
8
|
+
from argenta.response import Response
|
9
|
+
from argenta.app import App
|
10
|
+
|
11
|
+
|
12
|
+
T = TypeVar("T")
|
13
|
+
|
14
|
+
|
15
|
+
def inject(func: Callable[..., T]) -> Callable[..., T]:
|
16
|
+
return wrap_injection(
|
17
|
+
func=func,
|
18
|
+
is_async=False,
|
19
|
+
container_getter=_get_container_from_response,
|
20
|
+
)
|
21
|
+
|
22
|
+
|
23
|
+
def setup_dishka(app: App, *, auto_inject: bool = False) -> None:
|
24
|
+
if auto_inject:
|
25
|
+
_auto_inject_handlers(app)
|
26
|
+
|
27
|
+
|
28
|
+
def _get_container_from_response(
|
29
|
+
args: tuple[Any, ...], kwargs: dict[str, Any]
|
30
|
+
) -> Container:
|
31
|
+
for arg in args:
|
32
|
+
if isinstance(arg, Response):
|
33
|
+
if hasattr(arg, "_dishka_container"):
|
34
|
+
return arg._dishka_container # pyright: ignore[reportPrivateUsage]
|
35
|
+
break
|
36
|
+
|
37
|
+
raise RuntimeError("dishka container not found in Response")
|
38
|
+
|
39
|
+
|
40
|
+
def _auto_inject_handlers(app: App) -> None:
|
41
|
+
for router in app.registered_routers:
|
42
|
+
for command_handler in router.command_handlers:
|
43
|
+
if not is_dishka_injected(command_handler.handler_as_func):
|
44
|
+
injected_handler = inject(command_handler.handler_as_func)
|
45
|
+
command_handler.handler_as_func = injected_handler
|
argenta/di/providers.py
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
from argenta.orchestrator.argparser import ArgParser
|
2
|
+
from dishka import Provider, provide, Scope
|
3
|
+
|
4
|
+
from argenta.orchestrator.argparser.entity import ArgSpace
|
5
|
+
|
6
|
+
|
7
|
+
class SystemProvider(Provider):
|
8
|
+
def __init__(self, arg_parser: ArgParser):
|
9
|
+
super().__init__()
|
10
|
+
self._arg_parser: ArgParser = arg_parser
|
11
|
+
|
12
|
+
@provide(scope=Scope.APP)
|
13
|
+
def get_argspace(self) -> ArgSpace:
|
14
|
+
return self._arg_parser.parse_args()
|
argenta/orchestrator/__init__.py
CHANGED
@@ -1,8 +1,4 @@
|
|
1
|
-
__all__ = [
|
2
|
-
"Orchestrator",
|
3
|
-
"ArgParser"
|
4
|
-
]
|
1
|
+
__all__ = ["ArgParser", "Orchestrator"]
|
5
2
|
|
6
|
-
|
7
|
-
from argenta.orchestrator.entity import Orchestrator
|
8
3
|
from argenta.orchestrator.argparser.entity import ArgParser
|
4
|
+
from argenta.orchestrator.entity import Orchestrator
|
@@ -1,12 +1,9 @@
|
|
1
1
|
__all__ = [
|
2
2
|
"ArgParser",
|
3
|
-
"
|
4
|
-
"
|
5
|
-
"BooleanArgument"
|
3
|
+
"BooleanArgument",
|
4
|
+
"ValueArgument"
|
6
5
|
]
|
7
6
|
|
8
7
|
|
9
8
|
from argenta.orchestrator.argparser.entity import ArgParser
|
10
|
-
from argenta.orchestrator.argparser.arguments import
|
11
|
-
PositionalArgument,
|
12
|
-
OptionalArgument)
|
9
|
+
from argenta.orchestrator.argparser.arguments import BooleanArgument, ValueArgument
|
@@ -1,8 +1,8 @@
|
|
1
|
-
__all__ = ["BooleanArgument", "
|
1
|
+
__all__ = ["BooleanArgument", "ValueArgument", "InputArgument"]
|
2
2
|
|
3
3
|
|
4
4
|
from argenta.orchestrator.argparser.arguments.models import (
|
5
5
|
BooleanArgument,
|
6
|
-
|
7
|
-
|
6
|
+
ValueArgument,
|
7
|
+
InputArgument
|
8
8
|
)
|
@@ -1,62 +1,82 @@
|
|
1
|
-
from
|
2
|
-
from typing import Literal, override
|
1
|
+
from typing import Literal
|
3
2
|
|
4
3
|
|
5
|
-
class BaseArgument
|
4
|
+
class BaseArgument:
|
6
5
|
"""
|
7
6
|
Private. Base class for all arguments
|
8
7
|
"""
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
Public. Returns the string representation of the argument
|
14
|
-
:return: the string representation as a str
|
15
|
-
"""
|
16
|
-
raise NotImplementedError
|
17
|
-
|
18
|
-
|
19
|
-
class PositionalArgument(BaseArgument):
|
20
|
-
def __init__(self, name: str):
|
8
|
+
def __init__(self, name: str, *,
|
9
|
+
help: str,
|
10
|
+
is_deprecated: bool,
|
11
|
+
prefix: Literal["-", "--", "---"]):
|
21
12
|
"""
|
22
|
-
Public.
|
23
|
-
:param name: name of the argument
|
13
|
+
Public. Boolean argument, does not require a value
|
14
|
+
:param name: name of the argument
|
15
|
+
:param help: help message for the argument
|
16
|
+
:param is_required: whether the argument is required
|
17
|
+
:param is_deprecated: whether the argument is deprecated
|
24
18
|
"""
|
25
19
|
self.name: str = name
|
26
|
-
|
20
|
+
self.help: str = help
|
21
|
+
self.is_deprecated: bool = is_deprecated
|
22
|
+
self.prefix: Literal["-", "--", "---"] = prefix
|
23
|
+
|
27
24
|
@property
|
28
|
-
@override
|
29
25
|
def string_entity(self) -> str:
|
30
|
-
return self.name
|
26
|
+
return self.prefix + self.name
|
31
27
|
|
32
28
|
|
33
|
-
class
|
34
|
-
def __init__(self, name: str,
|
29
|
+
class ValueArgument(BaseArgument):
|
30
|
+
def __init__(self, name: str, *,
|
31
|
+
prefix: Literal["-", "--", "---"] = "--",
|
32
|
+
help: str = "Help message for the value argument",
|
33
|
+
possible_values: list[str] | None = None,
|
34
|
+
default: str | None = None,
|
35
|
+
is_required: bool = False,
|
36
|
+
is_deprecated: bool = False):
|
35
37
|
"""
|
36
|
-
Public.
|
38
|
+
Public. Value argument, must have the value
|
37
39
|
:param name: name of the argument
|
38
|
-
:param prefix: prefix
|
40
|
+
:param prefix: prefix for the argument
|
41
|
+
:param help: help message for the argument
|
42
|
+
:param possible_values: list of possible values for the argument
|
43
|
+
:param default: default value for the argument
|
44
|
+
:param is_required: whether the argument is required
|
45
|
+
:param is_deprecated: whether the argument is deprecated
|
39
46
|
"""
|
40
|
-
self.
|
41
|
-
self.
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
def string_entity(self) -> str:
|
46
|
-
return self.prefix + self.name
|
47
|
+
self.default: str | None = default
|
48
|
+
self.possible_values: list[str] | None = possible_values
|
49
|
+
self.is_required: bool = is_required
|
50
|
+
self.action: str = "store"
|
51
|
+
super().__init__(name, prefix=prefix, help=help, is_deprecated=is_deprecated)
|
47
52
|
|
48
53
|
|
49
54
|
class BooleanArgument(BaseArgument):
|
50
|
-
def __init__(self, name: str,
|
55
|
+
def __init__(self, name: str, *,
|
56
|
+
prefix: Literal["-", "--", "---"] = "--",
|
57
|
+
help: str = "Help message for the boolean argument",
|
58
|
+
is_deprecated: bool = False):
|
51
59
|
"""
|
52
60
|
Public. Boolean argument, does not require a value
|
53
61
|
:param name: name of the argument
|
54
|
-
:param
|
62
|
+
:param help: help message for the argument
|
63
|
+
:param is_required: whether the argument is required
|
64
|
+
:param is_deprecated: whether the argument is deprecated
|
55
65
|
"""
|
56
|
-
self.
|
57
|
-
|
66
|
+
self.action: str = "store_true"
|
67
|
+
super().__init__(name, prefix=prefix, help=help, is_deprecated=is_deprecated)
|
58
68
|
|
59
|
-
|
60
|
-
|
61
|
-
def
|
62
|
-
|
69
|
+
|
70
|
+
class InputArgument:
|
71
|
+
def __init__(self, name: str,
|
72
|
+
value: str | None,
|
73
|
+
founder_class: type[BaseArgument]) -> None:
|
74
|
+
self.name: str = name
|
75
|
+
self.value: str | None = value
|
76
|
+
self.founder_class: type[BaseArgument] = founder_class
|
77
|
+
|
78
|
+
def __str__(self) -> str:
|
79
|
+
return f"InputArgument({self.name}={self.value})"
|
80
|
+
|
81
|
+
def __repr__(self) -> str:
|
82
|
+
return f"InputArgument<name={self.name}, value={self.value}, founder_class={self.founder_class.__name__}>"
|
@@ -1,16 +1,44 @@
|
|
1
1
|
from argparse import ArgumentParser, Namespace
|
2
|
+
from typing import Never, Self
|
2
3
|
|
3
4
|
from argenta.orchestrator.argparser.arguments.models import (
|
5
|
+
BaseArgument,
|
4
6
|
BooleanArgument,
|
5
|
-
|
6
|
-
|
7
|
+
InputArgument,
|
8
|
+
ValueArgument
|
7
9
|
)
|
8
10
|
|
11
|
+
|
12
|
+
class ArgSpace:
|
13
|
+
def __init__(self, all_arguments: list[InputArgument]) -> None:
|
14
|
+
self.all_arguments = all_arguments
|
15
|
+
|
16
|
+
@classmethod
|
17
|
+
def from_namespace(cls, namespace: Namespace,
|
18
|
+
processed_args: list[ValueArgument | BooleanArgument]) -> Self:
|
19
|
+
name_type_paired_args: dict[str, type[BaseArgument]] = {
|
20
|
+
arg.name: type(arg)
|
21
|
+
for arg in processed_args
|
22
|
+
}
|
23
|
+
return cls([InputArgument(name=name,
|
24
|
+
value=value,
|
25
|
+
founder_class=name_type_paired_args[name])
|
26
|
+
for name, value in vars(namespace).items()])
|
27
|
+
|
28
|
+
def get_by_name(self, name: str) -> InputArgument | None:
|
29
|
+
for arg in self.all_arguments:
|
30
|
+
if arg.name == name:
|
31
|
+
return arg
|
32
|
+
return None
|
33
|
+
|
34
|
+
def get_by_type(self, arg_type: type[BaseArgument]) -> list[InputArgument] | list[Never]:
|
35
|
+
return [arg for arg in self.all_arguments if arg.founder_class is arg_type]
|
36
|
+
|
9
37
|
|
10
38
|
class ArgParser:
|
11
39
|
def __init__(
|
12
40
|
self,
|
13
|
-
processed_args: list[
|
41
|
+
processed_args: list[ValueArgument | BooleanArgument], *,
|
14
42
|
name: str = "Argenta",
|
15
43
|
description: str = "Argenta available arguments",
|
16
44
|
epilog: str = "github.com/koloideal/Argenta | made by kolo",
|
@@ -22,18 +50,29 @@ class ArgParser:
|
|
22
50
|
:param epilog: the epilog of the ArgParse instance
|
23
51
|
:param processed_args: registered and processed arguments
|
24
52
|
"""
|
25
|
-
self.
|
26
|
-
self.
|
27
|
-
self.
|
53
|
+
self.name: str = name
|
54
|
+
self.description: str = description
|
55
|
+
self.epilog: str = epilog
|
56
|
+
self.processed_args: list[ValueArgument | BooleanArgument] = processed_args
|
28
57
|
|
29
|
-
self.
|
30
|
-
self._processed_args: list[PositionalArgument | OptionalArgument | BooleanArgument] = processed_args
|
58
|
+
self._core: ArgumentParser = ArgumentParser(prog=name, description=description, epilog=epilog)
|
31
59
|
|
32
60
|
for arg in processed_args:
|
33
|
-
if isinstance(arg,
|
34
|
-
_ = self.
|
35
|
-
|
36
|
-
|
61
|
+
if isinstance(arg, BooleanArgument):
|
62
|
+
_ = self._core.add_argument(arg.string_entity,
|
63
|
+
action=arg.action,
|
64
|
+
help=arg.help,
|
65
|
+
deprecated=arg.is_deprecated)
|
66
|
+
else:
|
67
|
+
_ = self._core.add_argument(arg.string_entity,
|
68
|
+
action=arg.action,
|
69
|
+
help=arg.help,
|
70
|
+
default=arg.default,
|
71
|
+
choices=arg.possible_values,
|
72
|
+
required=arg.is_required,
|
73
|
+
deprecated=arg.is_deprecated)
|
37
74
|
|
38
|
-
def parse_args(self) ->
|
39
|
-
return self.
|
75
|
+
def parse_args(self) -> ArgSpace:
|
76
|
+
return ArgSpace.from_namespace(namespace=self._core.parse_args(),
|
77
|
+
processed_args=self.processed_args)
|
78
|
+
|
argenta/orchestrator/entity.py
CHANGED
@@ -1,17 +1,28 @@
|
|
1
|
-
from argparse import Namespace
|
2
|
-
|
3
1
|
from argenta.app import App
|
2
|
+
from argenta.response import Response
|
3
|
+
|
4
4
|
from argenta.orchestrator.argparser import ArgParser
|
5
|
+
from argenta.di.integration import setup_dishka
|
6
|
+
from argenta.di.providers import SystemProvider
|
7
|
+
|
8
|
+
from dishka import Provider, make_container
|
9
|
+
|
10
|
+
|
11
|
+
DEFAULT_ARGPARSER: ArgParser = ArgParser(processed_args=[])
|
5
12
|
|
6
13
|
|
7
14
|
class Orchestrator:
|
8
|
-
def __init__(self, arg_parser: ArgParser
|
15
|
+
def __init__(self, arg_parser: ArgParser = DEFAULT_ARGPARSER,
|
16
|
+
custom_providers: list[Provider] = [],
|
17
|
+
auto_inject_handlers: bool = True):
|
9
18
|
"""
|
10
19
|
Public. An orchestrator and configurator that defines the behavior of an integrated system, one level higher than the App
|
11
20
|
:param arg_parser: Cmd argument parser and configurator at startup
|
12
21
|
:return: None
|
13
22
|
"""
|
14
|
-
self._arg_parser: ArgParser
|
23
|
+
self._arg_parser: ArgParser = arg_parser
|
24
|
+
self._custom_providers: list[Provider] = custom_providers
|
25
|
+
self._auto_inject_handlers: bool = auto_inject_handlers
|
15
26
|
|
16
27
|
def start_polling(self, app: App) -> None:
|
17
28
|
"""
|
@@ -19,14 +30,8 @@ class Orchestrator:
|
|
19
30
|
:param app: a running application
|
20
31
|
:return: None
|
21
32
|
"""
|
22
|
-
|
33
|
+
container = make_container(SystemProvider(self._arg_parser), *self._custom_providers)
|
34
|
+
Response.patch_by_container(container)
|
35
|
+
setup_dishka(app, auto_inject=self._auto_inject_handlers)
|
23
36
|
|
24
|
-
|
25
|
-
"""
|
26
|
-
Public. Returns the arguments parsed
|
27
|
-
:return: None
|
28
|
-
"""
|
29
|
-
if self._arg_parser:
|
30
|
-
return self._arg_parser.parse_args()
|
31
|
-
else:
|
32
|
-
return None
|
37
|
+
app.run_polling()
|
argenta/response/entity.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
from
|
1
|
+
from dishka import Container
|
2
|
+
|
2
3
|
from argenta.command.flag.flags.models import InputFlags
|
3
4
|
from argenta.response.status import ResponseStatus
|
4
5
|
|
@@ -7,7 +8,7 @@ EMPTY_INPUT_FLAGS: InputFlags = InputFlags()
|
|
7
8
|
|
8
9
|
|
9
10
|
class Response:
|
10
|
-
|
11
|
+
_dishka_container: Container
|
11
12
|
|
12
13
|
def __init__(
|
13
14
|
self,
|
@@ -21,3 +22,7 @@ class Response:
|
|
21
22
|
"""
|
22
23
|
self.status: ResponseStatus = status
|
23
24
|
self.input_flags: InputFlags = input_flags
|
25
|
+
|
26
|
+
@classmethod
|
27
|
+
def patch_by_container(cls, container: Container) -> None:
|
28
|
+
cls._dishka_container = container
|
@@ -6,13 +6,13 @@ from argenta.response import Response
|
|
6
6
|
|
7
7
|
|
8
8
|
class CommandHandler:
|
9
|
-
def __init__(self, handler_as_func: Callable[
|
9
|
+
def __init__(self, handler_as_func: Callable[..., None], handled_command: Command):
|
10
10
|
"""
|
11
11
|
Private. Entity of the model linking the handler and the command being processed
|
12
12
|
:param handler: the handler being called
|
13
13
|
:param handled_command: the command being processed
|
14
14
|
"""
|
15
|
-
self.handler_as_func: Callable[
|
15
|
+
self.handler_as_func: Callable[..., None] = handler_as_func
|
16
16
|
self.handled_command: Command = handled_command
|
17
17
|
|
18
18
|
def handling(self, response: Response) -> None:
|
@@ -30,7 +30,9 @@ class CommandHandlers:
|
|
30
30
|
Private. The model that unites all CommandHandler of the routers
|
31
31
|
:param command_handlers: list of CommandHandlers for register
|
32
32
|
"""
|
33
|
-
self.command_handlers: list[CommandHandler] =
|
33
|
+
self.command_handlers: list[CommandHandler] = (
|
34
|
+
command_handlers if command_handlers else []
|
35
|
+
)
|
34
36
|
|
35
37
|
def add_handler(self, command_handler: CommandHandler) -> None:
|
36
38
|
"""
|
argenta/router/entity.py
CHANGED
@@ -6,25 +6,23 @@ from argenta.command import Command, InputCommand
|
|
6
6
|
from argenta.command.flag import ValidationStatus
|
7
7
|
from argenta.response import Response, ResponseStatus
|
8
8
|
from argenta.router.command_handler.entity import CommandHandlers, CommandHandler
|
9
|
-
from argenta.command.flag.flags import
|
10
|
-
Flags,
|
11
|
-
InputFlags
|
12
|
-
)
|
9
|
+
from argenta.command.flag.flags import Flags, InputFlags
|
13
10
|
from argenta.router.exceptions import (
|
14
11
|
RepeatedFlagNameException,
|
15
|
-
TooManyTransferredArgsException,
|
16
12
|
RequiredArgumentNotPassedException,
|
17
13
|
TriggerContainSpacesException,
|
18
14
|
)
|
19
15
|
|
20
16
|
|
21
|
-
HandlerFunc: TypeAlias = Callable[
|
17
|
+
HandlerFunc: TypeAlias = Callable[..., None]
|
22
18
|
|
23
19
|
|
24
20
|
class Router:
|
25
21
|
def __init__(
|
26
|
-
self,
|
27
|
-
|
22
|
+
self,
|
23
|
+
*,
|
24
|
+
title: str | None = "Default title",
|
25
|
+
disable_redirect_stdout: bool = False,
|
28
26
|
):
|
29
27
|
"""
|
30
28
|
Public. Directly configures and manages handlers
|
@@ -58,7 +56,6 @@ class Router:
|
|
58
56
|
def decorator(func: HandlerFunc) -> HandlerFunc:
|
59
57
|
_validate_func_args(func)
|
60
58
|
self.command_handlers.add_handler(CommandHandler(func, redefined_command))
|
61
|
-
|
62
59
|
return func
|
63
60
|
|
64
61
|
return decorator
|
@@ -91,7 +88,9 @@ class Router:
|
|
91
88
|
handle_command = command_handler.handled_command
|
92
89
|
if handle_command.registered_flags.flags:
|
93
90
|
if input_command_flags.flags:
|
94
|
-
response: Response = _structuring_input_flags(
|
91
|
+
response: Response = _structuring_input_flags(
|
92
|
+
handle_command, input_command_flags
|
93
|
+
)
|
95
94
|
command_handler.handling(response)
|
96
95
|
else:
|
97
96
|
response = Response(ResponseStatus.ALL_FLAGS_VALID)
|
@@ -102,7 +101,9 @@ class Router:
|
|
102
101
|
for input_flag in input_command_flags:
|
103
102
|
input_flag.status = ValidationStatus.UNDEFINED
|
104
103
|
undefined_flags.add_flag(input_flag)
|
105
|
-
response = Response(
|
104
|
+
response = Response(
|
105
|
+
ResponseStatus.UNDEFINED_FLAGS, input_flags=undefined_flags
|
106
|
+
)
|
106
107
|
command_handler.handling(response)
|
107
108
|
else:
|
108
109
|
response = Response(ResponseStatus.ALL_FLAGS_VALID)
|
@@ -137,14 +138,17 @@ class CommandDecorator:
|
|
137
138
|
self.router: Router = router_instance
|
138
139
|
self.command: Command = command
|
139
140
|
|
140
|
-
def __call__(self, handler_func: Callable[
|
141
|
+
def __call__(self, handler_func: Callable[..., None]) -> Callable[..., None]:
|
141
142
|
_validate_func_args(handler_func)
|
142
|
-
self.router.command_handlers.add_handler(
|
143
|
+
self.router.command_handlers.add_handler(
|
144
|
+
CommandHandler(handler_func, self.command)
|
145
|
+
)
|
143
146
|
return handler_func
|
144
147
|
|
145
148
|
|
146
|
-
def _structuring_input_flags(
|
147
|
-
|
149
|
+
def _structuring_input_flags(
|
150
|
+
handled_command: Command, input_flags: InputFlags
|
151
|
+
) -> Response:
|
148
152
|
"""
|
149
153
|
Private. Validates flags of input command
|
150
154
|
:param handled_command: entity of the handled command
|
@@ -154,45 +158,42 @@ def _structuring_input_flags(handled_command: Command,
|
|
154
158
|
invalid_value_flags, undefined_flags = False, False
|
155
159
|
|
156
160
|
for flag in input_flags:
|
157
|
-
flag_status: ValidationStatus =
|
161
|
+
flag_status: ValidationStatus = handled_command.validate_input_flag(flag)
|
158
162
|
flag.status = flag_status
|
159
163
|
if flag_status == ValidationStatus.INVALID:
|
160
164
|
invalid_value_flags = True
|
161
165
|
elif flag_status == ValidationStatus.UNDEFINED:
|
162
166
|
undefined_flags = True
|
163
167
|
|
164
|
-
status = ResponseStatus.from_flags(
|
165
|
-
|
166
|
-
|
167
|
-
return Response(
|
168
|
-
status=status,
|
169
|
-
input_flags=input_flags
|
168
|
+
status = ResponseStatus.from_flags(
|
169
|
+
has_invalid_value_flags=invalid_value_flags, has_undefined_flags=undefined_flags
|
170
170
|
)
|
171
171
|
|
172
|
-
|
172
|
+
return Response(status=status, input_flags=input_flags)
|
173
|
+
|
174
|
+
|
175
|
+
def _validate_func_args(func: Callable[..., None]) -> None:
|
173
176
|
"""
|
174
177
|
Private. Validates the arguments of the handler
|
175
178
|
:param func: entity of the handler func
|
176
179
|
:return: None if func is valid else raise exception
|
177
180
|
"""
|
178
181
|
transferred_args = getfullargspec(func).args
|
179
|
-
if len(transferred_args)
|
180
|
-
raise TooManyTransferredArgsException()
|
181
|
-
elif len(transferred_args) == 0:
|
182
|
+
if len(transferred_args) == 0:
|
182
183
|
raise RequiredArgumentNotPassedException()
|
183
184
|
|
184
|
-
|
185
|
+
response_arg: str = transferred_args[0]
|
185
186
|
func_annotations: dict[str, None] = get_annotations(func)
|
186
187
|
|
187
|
-
|
188
|
+
response_arg_annotation = func_annotations.get(response_arg)
|
188
189
|
|
189
|
-
if
|
190
|
-
if
|
190
|
+
if response_arg_annotation is not None:
|
191
|
+
if response_arg_annotation is not Response:
|
191
192
|
source_line: int = getsourcelines(func)[1]
|
192
193
|
Console().print(
|
193
|
-
f'\nFile "{getsourcefile(func)}", line {source_line}\n[b red]WARNING:[/b red] [i]The typehint '
|
194
|
-
f"of argument([green]{
|
195
|
-
f" [i]but[/i] [bold blue]{
|
194
|
+
f'\nFile "{getsourcefile(func)}", line {source_line}\n[b red]WARNING:[/b red] [i]The typehint '
|
195
|
+
+ f"of argument([green]{response_arg}[/green]) passed to the handler must be [/i][bold blue]{Response}[/bold blue],"
|
196
|
+
+ f" [i]but[/i] [bold blue]{response_arg_annotation}[/bold blue] [i]is specified[/i]",
|
196
197
|
highlight=False,
|
197
198
|
)
|
198
199
|
|
argenta/router/exceptions.py
CHANGED
@@ -5,24 +5,17 @@ class RepeatedFlagNameException(Exception):
|
|
5
5
|
"""
|
6
6
|
Private. Raised when a repeated flag name is registered
|
7
7
|
"""
|
8
|
-
@override
|
9
|
-
def __str__(self) -> str:
|
10
|
-
return "Repeated registered flag names in register command"
|
11
8
|
|
12
|
-
|
13
|
-
class TooManyTransferredArgsException(Exception):
|
14
|
-
"""
|
15
|
-
Private. Raised when too many arguments are passed
|
16
|
-
"""
|
17
9
|
@override
|
18
10
|
def __str__(self) -> str:
|
19
|
-
return "
|
11
|
+
return "Repeated registered flag names in register command"
|
20
12
|
|
21
13
|
|
22
14
|
class RequiredArgumentNotPassedException(Exception):
|
23
15
|
"""
|
24
16
|
Private. Raised when a required argument is not passed
|
25
17
|
"""
|
18
|
+
|
26
19
|
@override
|
27
20
|
def __str__(self) -> str:
|
28
21
|
return "Required argument not passed"
|
@@ -32,6 +25,7 @@ class TriggerContainSpacesException(Exception):
|
|
32
25
|
"""
|
33
26
|
Private. Raised when there is a space in the trigger being registered
|
34
27
|
"""
|
28
|
+
|
35
29
|
@override
|
36
30
|
def __str__(self) -> str:
|
37
31
|
return "Command trigger cannot contain spaces"
|
@@ -1,13 +1,14 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: argenta
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.2
|
4
4
|
Summary: Python library for building modular CLI applications
|
5
5
|
Author-email: kolo <kolo.is.main@gmail.com>
|
6
6
|
License: MIT
|
7
7
|
License-File: LICENSE
|
8
8
|
Requires-Python: >=3.11
|
9
9
|
Requires-Dist: art<7.0,>=6.4
|
10
|
-
Requires-Dist:
|
10
|
+
Requires-Dist: dishka>=1.7.2
|
11
|
+
Requires-Dist: pyreadline3>=3.5.4; sys_platform == 'win32'
|
11
12
|
Requires-Dist: rich<15.0.0,>=14.0.0
|
12
13
|
Description-Content-Type: text/markdown
|
13
14
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
argenta/__init__.py,sha256=
|
1
|
+
argenta/__init__.py,sha256=3WcEE8aozvDhboffaTi5LwR5oduFG3NLr7Z3WmlfHx4,181
|
2
2
|
argenta/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
argenta/app/__init__.py,sha256=eC03K3EN4L7XevITTy8Em_I_PihnSeTiWeMsElxeV-0,368
|
4
4
|
argenta/app/defaults.py,sha256=TmpHGfEmJeefgJlgW90rfw9xTgssNANRds6JZqKdDrc,379
|
5
|
-
argenta/app/models.py,sha256=
|
5
|
+
argenta/app/models.py,sha256=EdY7JzvDtHGumUaX9CaF3OTu6-nuwDbkF5JJdW_sSDM,22216
|
6
6
|
argenta/app/protocols.py,sha256=G7xOmAzNII2S8PbbovrvibK0keJuyvFBQvqQAH_gEP4,614
|
7
7
|
argenta/app/autocompleter/__init__.py,sha256=VT_p3QA78UnczV7pYR2NnwQ0Atd8mnDUnLazvUQNqJk,93
|
8
8
|
argenta/app/autocompleter/entity.py,sha256=IMK69PUScwsomswig7mbr9NyJ_Ee-ACZqNxbcBcB-UM,3540
|
@@ -18,24 +18,27 @@ argenta/command/flag/defaults.py,sha256=jtIyEVmC2zHxBC2eZg_VNB537fv4bq5d1Ut7LeAT
|
|
18
18
|
argenta/command/flag/models.py,sha256=6IThEBF-LpADF0HIoSJmFG08lJQ98buqcTo5HzKK500,3880
|
19
19
|
argenta/command/flag/flags/__init__.py,sha256=jCJ_qGj-bnCa31Haqws44zQw315vyrfcOviIaLAeupU,132
|
20
20
|
argenta/command/flag/flags/models.py,sha256=AgP9GcrhD2oY7RP39lpyjLQSzUGK9K4QZfsZt5R6hWk,3419
|
21
|
+
argenta/di/__init__.py,sha256=z63m1yExyRS8mL_heaLmbIDxfvYCZXpqDW_mlF_4lHQ,114
|
22
|
+
argenta/di/integration.py,sha256=S1v4VCJDg83EGyEqxckJw6IHyyMNnLqEkXFCJY3BoBE,1389
|
23
|
+
argenta/di/providers.py,sha256=DgcseexOvFW0Co_3I_iso7uBcWMiphJiN7xyiBDP2Yc,444
|
21
24
|
argenta/metrics/__init__.py,sha256=PPLFPxhe4j7r6hP1P1pk0A_gnXgylbTaHqopky872AU,109
|
22
25
|
argenta/metrics/main.py,sha256=SRz25JZ85Kj3rVVwQi5jpuojumopB2ADJnEZ8CsmirI,507
|
23
|
-
argenta/orchestrator/__init__.py,sha256=
|
24
|
-
argenta/orchestrator/entity.py,sha256=
|
25
|
-
argenta/orchestrator/argparser/__init__.py,sha256=
|
26
|
-
argenta/orchestrator/argparser/entity.py,sha256=
|
27
|
-
argenta/orchestrator/argparser/arguments/__init__.py,sha256=
|
28
|
-
argenta/orchestrator/argparser/arguments/models.py,sha256=
|
26
|
+
argenta/orchestrator/__init__.py,sha256=FcbPfws83FGtNb0bgU0X7BCNzGiVxJHpUeKgfRSOzUg,158
|
27
|
+
argenta/orchestrator/entity.py,sha256=8l1SLRtvd7ADQheUARWQEJh074eMyJLVKHbUMlPQZ3w,1414
|
28
|
+
argenta/orchestrator/argparser/__init__.py,sha256=WpDYIJtpls2kjbEbKcpVmqO8zXL77dD808uSd-pCpI4,229
|
29
|
+
argenta/orchestrator/argparser/entity.py,sha256=KG0t3Z_jZNUK2tEMYmJoGHITR5AAyk76Ym9t8b6B3jw,3332
|
30
|
+
argenta/orchestrator/argparser/arguments/__init__.py,sha256=k2atEfPmOAYUVChUgMbN31l4xJ5AaQ7diMF6U0LOLCU,196
|
31
|
+
argenta/orchestrator/argparser/arguments/models.py,sha256=3IRLTA_RzxKSMgCPRwglLNr5Zkrwhu299_0GmRJmI3c,3285
|
29
32
|
argenta/response/__init__.py,sha256=tbo5CC-nrVLlr13yiPHPNHdpSjxeSak_pC-NEXoyfqA,144
|
30
|
-
argenta/response/entity.py,sha256=
|
33
|
+
argenta/response/entity.py,sha256=zZ_qiL-yth63j6v4DWODH2_W9KxoxQn67JukfJurQIk,791
|
31
34
|
argenta/response/status.py,sha256=sX2qoqPSMDKF7zmCGjmmh29qEzP5Aoc4MMjo_Sz48bE,765
|
32
35
|
argenta/router/__init__.py,sha256=CDhhu5aX4_vHlgX6PZvvbT5_x4-S1XieOPqWU9cwPIs,68
|
33
36
|
argenta/router/defaults.py,sha256=vvkwFYCQdwjtMntfyrJuisxFX8XxeyhDMA-RwteHZGg,87
|
34
|
-
argenta/router/entity.py,sha256=
|
35
|
-
argenta/router/exceptions.py,sha256=
|
37
|
+
argenta/router/entity.py,sha256=tNURPfYZympY6s81Z7UXXdGJJpYXKB5C6qIbyNcyYHw,8699
|
38
|
+
argenta/router/exceptions.py,sha256=EzUMPstySz66s1dFDInbet1Gda7Jw5wYzodPVjRTrQY,755
|
36
39
|
argenta/router/command_handler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
37
|
-
argenta/router/command_handler/entity.py,sha256=
|
38
|
-
argenta-1.1.
|
39
|
-
argenta-1.1.
|
40
|
-
argenta-1.1.
|
41
|
-
argenta-1.1.
|
40
|
+
argenta/router/command_handler/entity.py,sha256=I4rWMjfHF5tw9VuCvMgFKt9Z5MziC-ifAXlK7n3zmj0,1815
|
41
|
+
argenta-1.1.2.dist-info/METADATA,sha256=ypvicXr3aIufMvs4h89gL9lONBDwTDQyFrLHW8skDZo,2035
|
42
|
+
argenta-1.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
43
|
+
argenta-1.1.2.dist-info/licenses/LICENSE,sha256=zmqoGh2n5rReBv4s8wPxF_gZEZDgauJYSPMuPczgOiU,1082
|
44
|
+
argenta-1.1.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|