mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
Update documentation
This commit is contained in:
@@ -1,28 +1,20 @@
|
||||
from argenta.orchestrator.argparser import ArgParser, ValueArgument
|
||||
|
||||
# Create arguments
|
||||
config_arg = ValueArgument(
|
||||
"config",
|
||||
help="Path to configuration file",
|
||||
default="config.yaml"
|
||||
)
|
||||
config_arg = ValueArgument("config", help="Path to configuration file", default="config.yaml")
|
||||
|
||||
log_level_arg = ValueArgument(
|
||||
"log-level",
|
||||
help="Logging level",
|
||||
possible_values=["DEBUG", "INFO", "WARNING", "ERROR"],
|
||||
default="INFO"
|
||||
default="INFO",
|
||||
)
|
||||
|
||||
host_arg = ValueArgument(
|
||||
"host",
|
||||
help="Server host address",
|
||||
is_required=True
|
||||
)
|
||||
host_arg = ValueArgument("host", help="Server host address", is_required=True)
|
||||
|
||||
# Register in ArgParser
|
||||
parser = ArgParser(
|
||||
processed_args=[config_arg, log_level_arg, host_arg],
|
||||
name="MyApp",
|
||||
description="My application with CLI arguments"
|
||||
description="My application with CLI arguments",
|
||||
)
|
||||
@@ -1,23 +1,9 @@
|
||||
from argenta.orchestrator.argparser import ArgParser, BooleanArgument
|
||||
|
||||
# Create boolean arguments
|
||||
verbose_arg = BooleanArgument(
|
||||
"verbose",
|
||||
help="Enable verbose output"
|
||||
)
|
||||
|
||||
debug_arg = BooleanArgument(
|
||||
"debug",
|
||||
help="Enable debug mode"
|
||||
)
|
||||
|
||||
no_cache_arg = BooleanArgument(
|
||||
"no-cache",
|
||||
help="Disable caching"
|
||||
)
|
||||
verbose_arg = BooleanArgument("verbose", help="Enable verbose output")
|
||||
debug_arg = BooleanArgument("debug", help="Enable debug mode")
|
||||
no_cache_arg = BooleanArgument("no-cache", help="Disable caching")
|
||||
|
||||
# Register in ArgParser
|
||||
parser = ArgParser(
|
||||
processed_args=[verbose_arg, debug_arg, no_cache_arg],
|
||||
name="MyApp"
|
||||
)
|
||||
parser = ArgParser(processed_args=[verbose_arg, debug_arg, no_cache_arg], name="MyApp")
|
||||
Reference in New Issue
Block a user