mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
ce7e24b924
The entire public api is covered with documentation in two languages - Russian and English. the library now supports the latest three versions of python - 3.12, 3.13 and 3.14 minor design changes: now, when a Boolean flag is entered, its value is an empty string, not None. tests have been adapted to the supported versions of python, readmi has been redesigned in two languages, German is no longer available.
33 lines
992 B
Python
33 lines
992 B
Python
from argenta.app import App
|
|
from argenta.command import Command
|
|
from argenta.metrics import get_time_of_pre_cycle_setup
|
|
from argenta.response import Response
|
|
from argenta.router import Router
|
|
|
|
|
|
def commands_with_two_aliases(num_of_commands: int):
|
|
router = Router()
|
|
|
|
for i in range(num_of_commands):
|
|
@router.command(Command(f'cmd{i}', aliases=[f'cdr{i}', f'prt{i}']))
|
|
def handler(response: Response): # pyright: ignore[reportUnusedFunction, reportUnusedParameter]
|
|
pass
|
|
|
|
app = App()
|
|
app.include_router(router)
|
|
|
|
return get_time_of_pre_cycle_setup(app)
|
|
|
|
def commands_with_one_aliases(num_of_commands: int):
|
|
router = Router()
|
|
|
|
for i in range(num_of_commands):
|
|
@router.command(Command(f'cmd{i}', aliases=[f'cdr{i}']))
|
|
def handler(response: Response): # pyright: ignore[reportUnusedFunction, reportUnusedParameter]
|
|
pass
|
|
|
|
app = App()
|
|
app.include_router(router)
|
|
|
|
return get_time_of_pre_cycle_setup(app)
|