Files
Argenta/docs/code_snippets/response/snippet1.py
T

13 lines
392 B
Python

from argenta import Command, Response, Router
from argenta.response import ResponseStatus
router = Router(title="Example")
@router.command(Command("greet", description="Greet the user"))
def greet_handler(response: Response):
if response.status == ResponseStatus.ALL_FLAGS_VALID:
print("Hello! All flags are valid.")
else:
print("Warning: Some flags have issues.")