mirror of
https://github.com/koloideal/Argenta.git
synced 2026-08-08 17:01:13 +03:00
docs: add CLI documentation section with translations and code snippets; refactor mock/ to examples/, improve CLI module (bug fixes, DX, error handling)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
from argenta import Command, Response, Router
|
||||
from argenta.command import Flag, Flags
|
||||
from argenta.command.flag import ValidationStatus
|
||||
|
||||
work_router: Router = Router(title="Base points:")
|
||||
|
||||
|
||||
@work_router.command(
|
||||
Command(
|
||||
"hello",
|
||||
flags=Flags([
|
||||
Flag("test")
|
||||
]),
|
||||
description="Hello, world!")
|
||||
)
|
||||
def command_help(response: Response):
|
||||
n = input('sfgdheth')
|
||||
print(f"Hello,{n} {response.input_flags.get_flag_by_name('test', with_status=ValidationStatus.VALID)}")
|
||||
Reference in New Issue
Block a user