class documentation

class ParameterSource(enum.Enum):

View In Hierarchy

This is an ~enum.Enum that indicates the source of a parameter's value.

Use click.Context.get_parameter_source to get the source for a parameter by name.

Changed in version 8.0: Use ~enum.Enum and drop the validate method.
Changed in version 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 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 =
The value was provided by the command line args.
Value
enum.auto()
DEFAULT =
Used the default specified by the parameter.
Value
enum.auto()
DEFAULT_MAP =
Used a default provided by Context.default_map.
Value
enum.auto()
ENVIRONMENT =
The value was provided with an environment variable.
Value
enum.auto()
PROMPT =
Used a prompt to confirm a default or provide a value.
Value
enum.auto()