This commit is contained in:
2025-11-01 11:38:48 +03:00
parent 0598f6e7a5
commit e4a5c6d398
73 changed files with 53 additions and 50 deletions
+17
View File
@@ -0,0 +1,17 @@
from argenta.command import Flags, Flag
from argenta import Command
import re
# Создание коллекции с флагами
flags = Flags([
Flag("host", possible_values=re.compile(r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$")),
Flag("port", possible_values=re.compile(r"^\d{1,5}$"))
])
# Использование в команде
cmd = Command(
"start",
description="Start the server",
flags=flags
)