ParamSet
ParamSet. Use to define a group of parameters that can be added multiple times. This will provid a list of dictionary as values : List[Dict[str, Any]]
Attributes
PRIVATE_VISIBILITY: Literal
PROTECTED_VISIBILITY: Literal
PUBLIC_VISIBILITY: Literal
additional_info: Optional
allowed_values: Optional
default_value: Optional
human_name: Optional
max_number_of_occurrences: int
optional: bool
param_set: Dict
short_description: Optional
unit: Optional
visibility: Literal
Functions
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
param_set | Dict | ||
optional | bool | False | It true, the param_set can have 0 occurence, the value will then be an empty array []. optional[str] |
visibility | Literal | public | Visibility of the param. it override all child spec visibility. see doc on type paramspecvisibilty for more info paramspecvisibilty |
human_name | Optional | Human readable name of the param, showed in the interface [str] | |
short_description | Optional | Description of the param, showed in the interface [str] | |
max_number_of_occurrences | int | -1 | Nb max of occurence of values the params. if negative, there is no limit. optional[str] |
Method call before the value is used (in task or view) to apply some transformation if needed by the ParamSpec. This does not affect the value in the database.
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
value | Any |
Return type:
Any |
Return type:
ParamSpecType |
Return type:
ParamSpecDTO |
Validate the value of the param and return the modified value if needed. This method is called when the param is set in the config before saving it in the database. The returned value must be serializable in json.l
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
value | List |
Return type:
ParamSpecType |
Return type:
ParamSpec |
Return type:
str |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
spec_dto | ParamSpecDTO |
Return type:
ParamSet |