Files
Argenta/docs/code_snippets/input_flags/snippet4.py
T
kolo ce7e24b924 feat: impl docs (#4)
The entire public api is covered with documentation in two languages - Russian and English.

the library now supports the latest three versions of python - 3.12, 3.13 and 3.14

minor design changes: now, when a Boolean flag is entered, its value is an empty string, not None.

tests have been adapted to the supported versions of python, readmi has been redesigned in two languages, German is no longer available.
2025-12-04 21:55:19 +03:00

25 lines
660 B
Python

from argenta.command.flag import InputFlag, InputFlags, ValidationStatus
# Create InputFlags collection
flags = InputFlags()
# Create several flags
flag1 = InputFlag(
name="option1", prefix="--", input_value="value1", status=ValidationStatus.VALID
)
flag2 = InputFlag(
name="option2", prefix="--", input_value="value2", status=ValidationStatus.VALID
)
flag3 = InputFlag(
name="option3", prefix="---", input_value="value3", status=ValidationStatus.VALID
)
# Add all flags in one call
flags.add_flags([flag1, flag2, flag3])
print(f"Total flags: {len(flags.flags)}")
for flag in flags:
print(f" - {flag.string_entity}: {flag.input_value}")