Update documentation and code snippets

This commit is contained in:
2025-12-04 20:23:11 +03:00
parent 723ed2210f
commit 087c76fed3
19 changed files with 278 additions and 114 deletions
+16
View File
@@ -0,0 +1,16 @@
from argenta import Router, Response
from argenta.command import Command, Flag
router = Router()
@router.command(Command("greet", flags=Flag("name")))
def greet_handler(response: Response):
# Get flag by name
name_flag = response.input_flags.get_flag_by_name("name")
# Check if flag was passed
if name_flag:
print(f"Hello, {name_flag.input_value}!")
else:
print("Hello, stranger!")