class documentation

class ParameterSource(enum.Enum): (source)

View In Hierarchy

This is an :class:`~enum.Enum` that indicates the source of a parameter's value. Use :meth:`click.Context.get_parameter_source` to get the source for a parameter by name. .. versionchanged:: 8.0 Use :class:`~enum.Enum` and drop the ``validate`` method. .. versionchanged:: 8.0 Added the ``PROMPT`` value.

Constant COMMANDLINE The value was provided by the command line args.
Constant DEFAULT Used the default specified by the parameter.
Constant DEFAULT_MAP Used a default provided by :attr:`Context.default_map`.
Constant ENVIRONMENT The value was provided with an environment variable.
Constant PROMPT Used a prompt to confirm a default or provide a value.
COMMANDLINE = (source)

The value was provided by the command line args.

Value
enum.auto()
DEFAULT = (source)

Used the default specified by the parameter.

Value
enum.auto()
DEFAULT_MAP = (source)

Used a default provided by :attr:`Context.default_map`.

Value
enum.auto()
ENVIRONMENT = (source)

The value was provided with an environment variable.

Value
enum.auto()
PROMPT = (source)

Used a prompt to confirm a default or provide a value.

Value
enum.auto()