ArgParserBase

class app.util.config.args.parser.ArgParserBase[source]

Bases: ArgumentParser

Inheritance diagram of ArgParserBase

Inheritance Diagram for ArgParserBase

Methods

__init__(*args, **kwargs)

add(*args, **kwargs)

add_argument(name, *args[, default])

Add a command-line argument to the global parser.

get_argv()

initialize()

parse(*args, **kwargs)

parse_args(*args, **kwargs)

Get the parsed command-line arguments.

__init__(*args, **kwargs)[source]
add(*args, **kwargs)[source]
Return type:

Action

add_argument(name, *args, default=None, **kwargs)[source]

Add a command-line argument to the global parser.

Parameters:
  • name (str) – The destination variable name.

  • *args – Argument flags (e.g., ‘-v’, ‘–verbosity’).

  • default – Default value if not set elsewhere.

  • **kwargs – Additional argparse options.

Return type:

Action

get_argv()[source]
Return type:

Sequence[str]

abstractmethod initialize()[source]
Return type:

None

parse(*args, **kwargs)[source]
Return type:

Namespace

parse_args(*args, **kwargs)[source]

Get the parsed command-line arguments.

Returns:

The parsed arguments.

Return type:

argparse.Namespace