diplomat.utils.cli_tools.CLIEngine

class diplomat.utils.cli_tools.CLIEngine(parent_parser: ArgumentParser)[source]

Bases: object

Represents a CLI program. Is a callable that accepts cli arguments and when called and executes the correct sub-command.

__init__(parent_parser: ArgumentParser)[source]

Private: Create a new CLIEngine. Internal, use build_full_parser to create an instance of this class instead.

Parameters:

parent_parser – An argparse ArgumentParser to wrap.

Methods

__init__(parent_parser)

Private: Create a new CLIEngine.

__call__(arg_list: List[str]) Any[source]

Run the command line interface of the constructed CLI program.

Parameters:

arg_list – A list of arguments passed by the user from the command line, excluding the program name. Equivalent to sys.argv[1:].