cowbird.cli.utils

Module Contents

Functions

subparser_help(→ SubParserArgs)

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(→ None)

Attributes

CommandPrefixes

SharedParsers

ParsedArgs

ParserArgs

HelperParser

ParseResult

ParserMaker

ParserRunner

SubParserArgs

PrintFormat

cowbird.cli.utils.CommandPrefixes[source]
cowbird.cli.utils.SharedParsers[source]
cowbird.cli.utils.ParsedArgs[source]
cowbird.cli.utils.ParserArgs[source]
cowbird.cli.utils.HelperParser[source]
cowbird.cli.utils.ParseResult[source]
cowbird.cli.utils.ParserMaker[source]
cowbird.cli.utils.ParserRunner[source]
cowbird.cli.utils.SubParserArgs[source]
cowbird.cli.utils.PrintFormat[source]
cowbird.cli.utils.subparser_help(description: str, parent_parser: argparse.ArgumentParser | None = None) SubParserArgs[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: logging.Logger | None = None) None[source]
cowbird.cli.utils.get_format_parser() argparse.ArgumentParser[source]
cowbird.cli.utils.print_format(data: cowbird.typedefs.JSON, fmt: PrintFormat, section: str | None = None) None[source]