mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 18:15:28 +03:00
Update documentation and code snippets
This commit is contained in:
+10
-10
@@ -1,11 +1,11 @@
|
||||
from argenta.orchestrator.argparser import ArgSpace, BooleanArgument, ValueArgument
|
||||
from argenta.orchestrator.argparser.arguments import InputArgument
|
||||
from argenta import Router, Command
|
||||
|
||||
argspace = ArgSpace([
|
||||
InputArgument(name="arg1", value="val1", founder_class=ValueArgument),
|
||||
InputArgument(name="arg2", value=True, founder_class=BooleanArgument),
|
||||
InputArgument(name="arg3", value="val3", founder_class=ValueArgument),
|
||||
])
|
||||
|
||||
print(argspace._name_object_paired_args)
|
||||
print(argspace.get_by_type(ValueArgument))
|
||||
router = Router()
|
||||
@router.command(Command('some', aliases=['test', 'case']))
|
||||
def handler(response): # pyright: ignore[reportUnusedFunction]
|
||||
pass
|
||||
@router.command(Command('ext', aliases=['more', 'foo']))
|
||||
def handler2(response): # pyright: ignore[reportUnusedFunction]
|
||||
pass
|
||||
|
||||
print(router.aliases)
|
||||
Reference in New Issue
Block a user