argenta 1.0.4__py3-none-any.whl → 1.0.5__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/app/defaults.py +2 -2
- argenta/app/models.py +3 -6
- argenta/command/flag/__init__.py +4 -1
- argenta/command/{flags → flag/flags}/__init__.py +1 -1
- argenta/command/models.py +1 -1
- argenta/metrics/__init__.py +4 -0
- argenta/metrics/main.py +26 -0
- argenta/response/entity.py +1 -1
- argenta/router/entity.py +1 -1
- {argenta-1.0.4.dist-info → argenta-1.0.5.dist-info}/METADATA +2 -2
- {argenta-1.0.4.dist-info → argenta-1.0.5.dist-info}/RECORD +14 -12
- /argenta/command/{flags → flag/flags}/models.py +0 -0
- {argenta-1.0.4.dist-info → argenta-1.0.5.dist-info}/WHEEL +0 -0
- {argenta-1.0.4.dist-info → argenta-1.0.5.dist-info}/licenses/LICENSE +0 -0
argenta/app/defaults.py
CHANGED
argenta/app/models.py
CHANGED
@@ -201,9 +201,7 @@ class BaseApp:
|
|
201
201
|
return False
|
202
202
|
return True
|
203
203
|
|
204
|
-
def _error_handler(
|
205
|
-
self, error: BaseInputCommandException, raw_command: str
|
206
|
-
) -> None:
|
204
|
+
def _error_handler(self, error: BaseInputCommandException, raw_command: str) -> None:
|
207
205
|
"""
|
208
206
|
Private. Handles parsing errors of the entered command
|
209
207
|
:param error: error being handled
|
@@ -296,7 +294,7 @@ class BaseApp:
|
|
296
294
|
|
297
295
|
self._unknown_command_handler = unknown_command_handler
|
298
296
|
|
299
|
-
def
|
297
|
+
def pre_cycle_setup(self) -> None:
|
300
298
|
"""
|
301
299
|
Private. Configures various aspects of the application before the start of the cycle
|
302
300
|
:return: None
|
@@ -330,7 +328,6 @@ class BaseApp:
|
|
330
328
|
self._print_func(message)
|
331
329
|
if self._messages_on_startup:
|
332
330
|
print("\n")
|
333
|
-
|
334
331
|
if not self._repeat_command_groups_description:
|
335
332
|
self._print_command_group_description()
|
336
333
|
|
@@ -381,7 +378,7 @@ class App(BaseApp):
|
|
381
378
|
Private. Starts the user input processing cycle
|
382
379
|
:return: None
|
383
380
|
"""
|
384
|
-
self.
|
381
|
+
self.pre_cycle_setup()
|
385
382
|
while True:
|
386
383
|
if self._repeat_command_groups_description:
|
387
384
|
self._print_command_group_description()
|
argenta/command/flag/__init__.py
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
__all__ = ["Flag", "InputFlag"]
|
1
|
+
__all__ = ["Flag", "InputFlag", "UndefinedInputFlags", "ValidInputFlags", "InvalidValueInputFlags", "Flags"]
|
2
2
|
|
3
3
|
|
4
4
|
from argenta.command.flag.models import Flag, InputFlag
|
5
|
+
from argenta.command.flag.flags.models import (UndefinedInputFlags,
|
6
|
+
ValidInputFlags, Flags,
|
7
|
+
InvalidValueInputFlags)
|
argenta/command/models.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
from argenta.command.flag.models import Flag, InputFlag
|
2
|
-
from argenta.command.flags.models import InputFlags, Flags
|
2
|
+
from argenta.command.flag.flags.models import InputFlags, Flags
|
3
3
|
from argenta.command.exceptions import (
|
4
4
|
UnprocessedInputFlagException,
|
5
5
|
RepeatedInputFlagsException,
|
argenta/metrics/main.py
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
import io
|
2
|
+
from contextlib import redirect_stdout
|
3
|
+
from time import time
|
4
|
+
|
5
|
+
from argenta.router import Router
|
6
|
+
from argenta.command import Command
|
7
|
+
from argenta.response import Response
|
8
|
+
from argenta.response.status import Status
|
9
|
+
from argenta.command.flag import Flag, Flags
|
10
|
+
from argenta.app import App
|
11
|
+
|
12
|
+
|
13
|
+
def get_time_of_pre_cycle_setup(app: App) -> float:
|
14
|
+
start = time()
|
15
|
+
with redirect_stdout(io.StringIO()):
|
16
|
+
app.pre_cycle_setup()
|
17
|
+
end = time()
|
18
|
+
return end - start
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
|
argenta/response/entity.py
CHANGED
argenta/router/entity.py
CHANGED
@@ -6,7 +6,7 @@ from argenta.command import Command
|
|
6
6
|
from argenta.command.models import InputCommand
|
7
7
|
from argenta.response import Response, Status
|
8
8
|
from argenta.router.command_handler.entity import CommandHandlers, CommandHandler
|
9
|
-
from argenta.command.flags
|
9
|
+
from argenta.command.flag.flags import (
|
10
10
|
Flags,
|
11
11
|
InputFlags,
|
12
12
|
UndefinedInputFlags,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: argenta
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.5
|
4
4
|
Summary: Python library for building modular CLI applications
|
5
5
|
Author-email: kolo <kolo.is.main@gmail.com>
|
6
6
|
License: MIT
|
@@ -15,7 +15,7 @@ Description-Content-Type: text/markdown
|
|
15
15
|
|
16
16
|
### Library for creating modular CLI applications
|
17
17
|
|
18
|
-
#### RU - [README.ru.md](https://github.com/koloideal/Argenta/blob/kolo/README.ru.md)
|
18
|
+
#### RU - [README.ru.md](https://github.com/koloideal/Argenta/blob/kolo/README.ru.md) • DE - [README.de.md](https://github.com/koloideal/Argenta/blob/kolo/README.de.md)
|
19
19
|
|
20
20
|

|
21
21
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
argenta/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
argenta/app/__init__.py,sha256=I8FTXU17ajDI-hbC6Rw0LxLmvDYipdQaos3v1pmu14E,57
|
3
|
-
argenta/app/defaults.py,sha256=
|
4
|
-
argenta/app/models.py,sha256=
|
3
|
+
argenta/app/defaults.py,sha256=TmpHGfEmJeefgJlgW90rfw9xTgssNANRds6JZqKdDrc,379
|
4
|
+
argenta/app/models.py,sha256=8Kr2605VMa2X7S9_XvLLR1WvOh7Y9mf8VqkWgBqNgfg,19777
|
5
5
|
argenta/app/autocompleter/__init__.py,sha256=VT_p3QA78UnczV7pYR2NnwQ0Atd8mnDUnLazvUQNqJk,93
|
6
6
|
argenta/app/autocompleter/entity.py,sha256=QgEZ2Tzfp9liWBCd-BdRpUE-ELUOxAhPpW7KBLVcPRE,3556
|
7
7
|
argenta/app/dividing_line/__init__.py,sha256=jJZDDZix8XYCAUWW4FzGJH0JmJlchYcx0FPWifjgv1I,147
|
@@ -10,12 +10,14 @@ argenta/app/registered_routers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
|
|
10
10
|
argenta/app/registered_routers/entity.py,sha256=OH7plYfjQrlyVliXE6OLVD2ftOAd5U1VO6SlyvLNikk,1078
|
11
11
|
argenta/command/__init__.py,sha256=RvacrM84ZwBdVDy4MUwjLTyzQdDQrjjoikZxwh5ov-0,69
|
12
12
|
argenta/command/exceptions.py,sha256=86Gs_9-NutmbSkduEMljtxQHWHhDRFcqyyOKDhQ440o,1060
|
13
|
-
argenta/command/models.py,sha256=
|
14
|
-
argenta/command/flag/__init__.py,sha256=
|
13
|
+
argenta/command/models.py,sha256=hhW1FJgRrxLg3MP1FkTqp5t1iDuhKyB4l2QCZ7dC76M,7185
|
14
|
+
argenta/command/flag/__init__.py,sha256=Xjh_nR4vsHPPHFxQmc5o0673DvbnRkdr_vUaA31GeEk,384
|
15
15
|
argenta/command/flag/defaults.py,sha256=1F9bEngv6tB_yn5lLQg5pxWZSuinryfGGdXnWD7EvuY,1035
|
16
16
|
argenta/command/flag/models.py,sha256=KAzyoNWVOVLiIT4f8auI15D0TCHosGXHGw_xXRuEtgY,3875
|
17
|
-
argenta/command/flags/__init__.py,sha256
|
18
|
-
argenta/command/flags/models.py,sha256=U4nOwCqsCOURGigTKiQx07zBUKj0EoY0fCwgTNq4GIg,2332
|
17
|
+
argenta/command/flag/flags/__init__.py,sha256=-HfdBZ3WXrjMrM8vEDWg0LLOLuQafqncrjw9KVFyqoE,294
|
18
|
+
argenta/command/flag/flags/models.py,sha256=U4nOwCqsCOURGigTKiQx07zBUKj0EoY0fCwgTNq4GIg,2332
|
19
|
+
argenta/metrics/__init__.py,sha256=PPLFPxhe4j7r6hP1P1pk0A_gnXgylbTaHqopky872AU,109
|
20
|
+
argenta/metrics/main.py,sha256=tMMrbpUIiW4BjYLhB7yWYK4mSBdjppeZtslf4VoXPsI,514
|
19
21
|
argenta/orchestrator/__init__.py,sha256=vFtJEJTjFfoYP3DZx0gNlhoa0Tk8u-yzkGIUN3SiABA,86
|
20
22
|
argenta/orchestrator/entity.py,sha256=kgTHGrbWdsTDR7aAKv2Bvm8pO7LKFv7v8Dv1LDsdrTo,1093
|
21
23
|
argenta/orchestrator/argparser/__init__.py,sha256=akbTPC5CfNrgJTVVu1A2E9KeI8KPN4JnMM8M8U21jc8,90
|
@@ -23,15 +25,15 @@ argenta/orchestrator/argparser/entity.py,sha256=i3lCsCr_8JT09OosvxRuRD7KKP1MgeNF
|
|
23
25
|
argenta/orchestrator/argparser/arguments/__init__.py,sha256=lRsKyJeiibPYhFZoeB3BRfIYM4mlUFp6nZpy9RdbgYg,213
|
24
26
|
argenta/orchestrator/argparser/arguments/models.py,sha256=wF4rIaEAx9Rt-c6rAeq6kZLfNPTn4v9WBNt9JHzJ0RA,1548
|
25
27
|
argenta/response/__init__.py,sha256=u4NuwUQkWa55aX67hTQs_B_gIaZ9Dn4Fe7xhSFQ_Rpw,128
|
26
|
-
argenta/response/entity.py,sha256=
|
28
|
+
argenta/response/entity.py,sha256=urzUQmZxk7BNGJj9tR9AcrTNM5dDLUiGLJDg3VdhDVk,1047
|
27
29
|
argenta/response/status.py,sha256=bWFMHvyIHpOA4LxUQFoSpld-F8gu183M9nY-zN-MiZM,244
|
28
30
|
argenta/router/__init__.py,sha256=rvqAx80IXHFdVw7cWBRGaTtb94a4OQQEsMJ5f7YA1gU,68
|
29
31
|
argenta/router/defaults.py,sha256=vvkwFYCQdwjtMntfyrJuisxFX8XxeyhDMA-RwteHZGg,87
|
30
|
-
argenta/router/entity.py,sha256=
|
32
|
+
argenta/router/entity.py,sha256=7vRhw8_U-gKb2KoKXBCYr8q0inuDQsGrxV49abt6bwU,9607
|
31
33
|
argenta/router/exceptions.py,sha256=5k0mTHYYItWHzGC0NU5oHHYrHxU0M5fEbO5wne_wFg8,860
|
32
34
|
argenta/router/command_handler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
33
35
|
argenta/router/command_handler/entity.py,sha256=xmHgbXBvD_-JMLpUPc5w3VVe-upTJ-y4lR13rUiiygo,2387
|
34
|
-
argenta-1.0.
|
35
|
-
argenta-1.0.
|
36
|
-
argenta-1.0.
|
37
|
-
argenta-1.0.
|
36
|
+
argenta-1.0.5.dist-info/METADATA,sha256=4achR5RDIS460uWEATjty-kIc7Q6OVqLvspnCwVMaTU,1649
|
37
|
+
argenta-1.0.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
38
|
+
argenta-1.0.5.dist-info/licenses/LICENSE,sha256=zmqoGh2n5rReBv4s8wPxF_gZEZDgauJYSPMuPczgOiU,1082
|
39
|
+
argenta-1.0.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|