module documentation

Undocumented

Class Argument Arguments are positional parameters to a command. They generally provide fewer features than options but can have infinite ``nargs`` and are required by default.
Class BaseCommand The base command implements the minimal API contract of commands. Most code will never use this as it does not implement a lot of useful functionality but it can act as the direct subclass of alternative parsing methods that do not depend on the Click parser.
Class Command Commands are the basic building block of command line interfaces in Click. A basic command handles command line parsing and might dispatch more parsing to commands nested below it.
Class CommandCollection A command collection is a multi command that merges multiple multi commands together into one. This is a straightforward implementation that accepts a list of different multi commands as sources and provides all the commands for each of them.
Class Context The context is a special internal object that holds state relevant for the script execution at every single level. It's normally invisible to commands unless they opt-in to getting access to it.
Class Group A group allows a command to have subcommands attached. This is the most common way to implement nesting in Click.
Class MultiCommand A multi command is the basic implementation of a command that dispatches to subcommands. The most common version is the :class:`Group`.
Class Option Options are usually optional values on the command line and have some extra features that arguments don't have.
Class Parameter A parameter to a command comes in two versions: they are either :class:`Option`\s or :class:`Argument`\s. Other subclasses are currently not supported by design as some of the internals for parsing are intentionally not finalized.
Class ParameterSource This is an :class:`~enum.Enum` that indicates the source of a parameter's value.
Function augment_usage_errors Context manager that attaches extra information to exceptions.
Function batch Undocumented
Function iter_params_for_processing Given a sequence of parameters in the order as should be considered for processing and an iterable of parameters that exist, this returns a list in the correct order as they should be processed.
Constant F Undocumented
Constant V Undocumented
Function _check_iter Check if the value is iterable but not a string. Raises a type error, or return an iterator over the value.
Function _check_multicommand Undocumented
Function _complete_visible_commands List all the subcommands of a group that start with the incomplete value and aren't hidden.
@contextmanager
def augment_usage_errors(ctx, param=None): (source)

Context manager that attaches extra information to exceptions.

Parameters
ctx:ContextUndocumented
param:t.Optional[Parameter]Undocumented
Returns
t.Iterator[None]Undocumented
def batch(iterable, batch_size): (source)

Undocumented

Parameters
iterable:t.Iterable[V]Undocumented
batch_size:intUndocumented
Returns
t.List[t.Tuple[V, ...]]Undocumented
def iter_params_for_processing(invocation_order, declaration_order): (source)

Given a sequence of parameters in the order as should be considered for processing and an iterable of parameters that exist, this returns a list in the correct order as they should be processed.

Parameters
invocation_order:t.Sequence[Parameter]Undocumented
declaration_order:t.Sequence[Parameter]Undocumented
Returns
t.List[Parameter]Undocumented

Undocumented

Value
t.TypeVar('F',
          bound=t.Callable[..., t.Any])

Undocumented

Value
t.TypeVar('V')
def _check_iter(value): (source)

Check if the value is iterable but not a string. Raises a type error, or return an iterator over the value.

Parameters
value:t.AnyUndocumented
Returns
t.Iterator[t.Any]Undocumented
def _check_multicommand(base_command, cmd_name, cmd, register=False): (source)

Undocumented

Parameters
base_command:MultiCommandUndocumented
cmd_name:strUndocumented
cmd:CommandUndocumented
register:boolUndocumented
def _complete_visible_commands(ctx, incomplete): (source)

List all the subcommands of a group that start with the incomplete value and aren't hidden. :param ctx: Invocation context for the group. :param incomplete: Value being completed. May be empty.

Parameters
ctx:ContextUndocumented
incomplete:strUndocumented
Returns
t.Iterator[t.Tuple[str, Command]]Undocumented