flowserv.model.parameter.list module
Declarations for list parameters. List parameter values are lists of values for a single parameter declaration.
- class flowserv.model.parameter.list.Array(name: str, para: flowserv.model.parameter.base.Parameter, index: Optional[int] = 0, label: Optional[str] = None, help: Optional[str] = None, default: Optional[List] = None, required: Optional[bool] = False, group: Optional[str] = None)
Bases:
flowserv.model.parameter.base.ParameterList parameter type to define lists of values that all match the same parameter declaration..
- cast(value: List) List
Convert the given value into a list where each value in the given list has been converted using the parameter declaration for the list parameter.
Raises an error if the value is not a list or if the associated parameter declaration raised an exception during cast.
- Parameters
value (any) – User-provided value for a template parameter.
- Return type
list
- Raises
- static from_dict(doc: Dict, validate: Optional[bool] = True) List
Get list parameter instance from a dictionary serialization.
- Parameters
doc (dict) – Dictionary serialization for a list parameter declaration.
validate (bool, default=True) – Validate the serialized object if True.
- Return type
flowserv.model.parameter.list.List
- Raises
- to_dict() Dict
Get dictionary serialization for the parameter declaration. Adds the serialized value for the list parameter declaration.
- Return type
dict