Skip to content

CLI Imports

This page documents the public CLI-related imports from pytask.

For command usage and options, see the command reference.

Command Line Entry Point

pytask.cli()

Manage your tasks with pytask.

CLI Types

pytask.ColoredCommand

Bases: Command

A command with colored help pages.

format_help(ctx, formatter)

Format the help text.

pytask.ColoredGroup

Bases: DefaultGroup

A command group with colored help pages.

format_help(ctx, formatter)

Format the help text.

pytask.EnumChoice

Bases: Choice

An enum-based choice type.

The implementation is copied from https://github.com/pallets/click/pull/2210 and related discussion can be found in https://github.com/pallets/click/issues/605.

In contrast to using click.Choice, using this type ensures that the error message does not show the enum members.

In contrast to the proposed implementation in the PR, this implementation does not use the members than rather the values of the enum.