diplomat.utils.cli_toolsΒΆ
Provides functions for turning typecaster annotated functions into CLI commands.
Module Attributes
Custom type caster type that represents a boolean flag argument on the command line (true/false doesn't need to be specified). |
Functions
|
Decorator: Allow arbitrary CLI flags on a typecaster function. |
|
Build an entire CLI interface with subcommands from a tree of typecaster functions. |
Create a copy of a typecaster function, with all CLI settings cleared. |
|
|
A decorator for attaching additional CLI arguments to an auto-cli function... |
|
Convert extra typecaster function arguments to a ConfigSpec. |
|
Convert a typecaster function into an argparse command (CLI command). |
|
Extracts the summary for a command from a function's doc string. |
Decorator: Mark the first n arguments to this typecaster function as positional. |
Classes
|
Represents a CLI program. |
|
Internal: Parses arguments for a single diplomat sub-command. |
|
Internal: A Subclass of argparse's HelpFormatter class, that correctly formats arguments when printing a help string to the CLI. |
Exceptions
A custom exception thrown when an error occurs when attempting to parse user CLI inputs. |