This commit is contained in:
2025-11-01 11:54:46 +03:00
parent e4a5c6d398
commit 9b28ef17ff
18 changed files with 916 additions and 2 deletions
+16
View File
@@ -0,0 +1,16 @@
from argenta import Router, Command, Response
from argenta.response import ResponseStatus
router = Router(title="Example")
@router.command(Command("greet", description="Greet the user"))
def greet_handler(response: Response):
# response автоматически передаётся в обработчик
# response.status содержит статус валидации флагов
# response.input_flags содержит все введённые флаги
if response.status == ResponseStatus.ALL_FLAGS_VALID:
print("Hello! All flags are valid.")
else:
print("Warning: Some flags have issues.")