This commit is contained in:
2025-10-28 09:38:07 +03:00
parent 7b40fff4c5
commit bc6cb583a7
49 changed files with 588 additions and 123 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
)