cowbird.cli.utils

Module Contents

Functions

subparser_help(→ Dict[str, str])

Generates both fields with the same description as each parameter is used in different context.

get_config_parser(→ argparse.ArgumentParser)

get_logger_parser(→ argparse.ArgumentParser)

set_log_level(→ None)

get_format_parser(→ argparse.ArgumentParser)

print_format(data, fmt[, section])

Attributes

CommandPrefixes

cowbird.cli.utils.CommandPrefixes[source]
cowbird.cli.utils.subparser_help(description: str, parent_parser: Optional[argparse.ArgumentParser] = None)Dict[str, str][source]

Generates both fields with the same description as each parameter is used in different context.

Field help is printed next to the subparser name when parent parser is called with --help. Field description populates the help details under the usage command when calling child parser --help.

cowbird.cli.utils.get_config_parser()argparse.ArgumentParser[source]
cowbird.cli.utils.get_logger_parser()argparse.ArgumentParser[source]
cowbird.cli.utils.set_log_level(args: argparse.Namespace, logger: Optional[logging.Logger] = None)None[source]
cowbird.cli.utils.get_format_parser()argparse.ArgumentParser[source]
cowbird.cli.utils.print_format(data, fmt, section=None)[source]