Param
🛈 DocStrings¶
Framework-independent description of a CLI parameter (option or argument).
Source code in src/clinspector/models/param.py
choices
class-attribute
instance-attribute
¶
List of valid choices for this parameter.
count
class-attribute
instance-attribute
¶
Whether the parameter increments an integer.
default
class-attribute
instance-attribute
¶
The default value of the parameter.
envvar
class-attribute
instance-attribute
¶
The environment variable name for this parameter.
expose_value
class-attribute
instance-attribute
¶
Whether value is passed onwards to the command callback and stored in context.
flag_value
class-attribute
instance-attribute
¶
Value used for this flag if enabled.
help
class-attribute
instance-attribute
¶
A formatted help text for this parameter.
is_option
property
¶
Whether this parameter is an option (as opposed to a positional argument).
metavar
class-attribute
instance-attribute
¶
How value is represented in the help page.
multiple
class-attribute
instance-attribute
¶
Whether the parameter is accepted multiple times and recorded.
nargs
class-attribute
instance-attribute
¶
The number of arguments this parameter matches. (Argparse may return * / ?)
opts
class-attribute
instance-attribute
¶
Options for this parameter.
param_type_name
class-attribute
instance-attribute
¶
Whether this parameter is an option or a positional argument.
prompt
class-attribute
instance-attribute
¶
Whether user is prompted for this parameter.
required
class-attribute
instance-attribute
¶
Whether the parameter is required.
secondary_opts
class-attribute
instance-attribute
¶
Secondary options for this parameter (e.g. --no-flag).
type
class-attribute
instance-attribute
¶
Name of the value type ("str", "int", "float", "bool", "path", ...).