argclz.core#

Classes

AbstractParser

Commandline parser.

Argument

(internal) Do not use class directly.

Functions

new_parser

Create ArgumentParser for instance.

parse_args

Parse the command-list arguments and apply the parsed values to the given instance

argument

create an argument attribute

pos_argument

create a positional (non-flag) command-line argument attribute.

var_argument

create a variable-length positional argument, suitable for capturing multiple values into a list.

aliased_argument

create an argument that supports shorthand aliases for specific constant values.

as_argument

cast argument attribute as an Argument for type checking framework/IDE.

foreach_arguments

iterating all argument attributes in instance.

with_defaults

Initialize all argument attributes by assign the default value if provided.

set_options

set argument to instance's attributes from argparse.Namespace .

copy_argument

copy argument from ref to opt

print_help

print help document.

as_dict

Collect all argument attributes into a dictionary with attribute name to its value.