define.param.constructors¶
ParamInfo
¶
Source code in /home/runner/work/arc/arc/arc/define/param/constructors.py
dict()
¶
Used to pass to Param()
as **kwargs
Source code in /home/runner/work/arc/arc/arc/define/param/constructors.py
Argument(*, name=None, default=constants.MISSING, desc=None, callback=None, prompt=None, envvar=None, get=None, complete=None, **kwargs)
¶
A CLI argument. Input is passed positionally.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name to use for the parameter on the command line. |
None
|
default |
t.Any
|
A default value for the parameter. If one is given, the argument becomes optional, otherwise it is required. |
constants.MISSING
|
desc |
str
|
A description of the parameter, will be added to the |
None
|
callback |
t.Callable
|
a Callable object that can be used to modify the value of this parameter. |
None
|
prompt |
str
|
A string to provide the user with as a prompt to request input from STDIN when none is provided from the command line. |
None
|
envvar |
str
|
Name of an enviroment variable to obtain a value from if one is not provided on the command line. |
None
|
get |
at.GetterFunc
|
Callable object to retrive a possible value for the command if one is not provided on the command line. |
None
|
complete |
at.CompletionFunc
|
Function to provide shell completions for this parameter. |
None
|
Example¶
Source code in /home/runner/work/arc/arc/arc/define/param/constructors.py
Count(*, name=None, short=None, default=0, desc=None, callback=None, **kwargs)
¶
A Flag that counts it's number of apperances on the command line
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name to use for the parameter on the command line. |
None
|
short |
str
|
A single character name to refer to this parameter to on the command line ( |
None
|
default |
int
|
The starting point for the counter. Should be an integer. |
0
|
desc |
str
|
A description of the parameter, will be added to the |
None
|
callback |
t.Callable
|
a Callable object that can be used to modify the value of this parameter. |
None
|
Example¶
Source code in /home/runner/work/arc/arc/arc/define/param/constructors.py
Flag(*, name=None, short=None, default=False, desc=None, callback=None, **kwargs)
¶
An option that represents a boolean value.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name to use for the parameter on the command line. |
None
|
short |
str
|
A single character name to refer to this parameter to on the command line ( |
None
|
default |
boolean
|
A default value for the parameter. If one is given, the argument becomes optional, otherwise it is required. |
False
|
desc |
str
|
A description of the parameter, will be added to the |
None
|
callback |
t.Callable
|
a Callable object that can be used to modify the value of this parameter. |
None
|
Example¶
Source code in /home/runner/work/arc/arc/arc/define/param/constructors.py
Option(*, name=None, short=None, default=constants.MISSING, desc=None, callback=None, prompt=None, envvar=None, get=None, complete=None, **kwargs)
¶
A (generally optional) keyword parameter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name to use for the parameter on the command line. |
None
|
short |
str
|
A single character name to refer to this parameter to on the command line ( |
None
|
default |
t.Any
|
A default value for the parameter. If one is given, the argument becomes optional, otherwise it is required. |
constants.MISSING
|
desc |
str
|
A description of the parameter, will be added to the |
None
|
callback |
t.Callable
|
a Callable object that can be used to modify the value of this parameter. |
None
|
prompt |
str
|
A string to provide the user with as a prompt to request input from STDIN when none is provided from the command line. |
None
|
envvar |
str
|
Name of an enviroment variable to obtain a value from if one is not provided on the command line. |
None
|
get |
at.GetterFunc
|
Callable object to retrive a possible value for the command if one is not provided on the command line. |
None
|
complete |
at.CompletionFunc
|
Function to provide shell completions for this parameter. |
None
|