ParameterModel#
- class ParameterModel(*, name, parent_name=None, label=None, parent_label=None, unit=None, data_type=None, collection_type=None, element_indices=None, **extra_data)#
Bases:
BaseModel
Pydantic parameter model
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Module:
exa.common.api.model.parameter_model
Attributes
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
name
parent_name
label
parent_label
unit
data_type
collection_type
element_indices
Methods
Creates instance of
exa.common.data.parameter.Parameter
out of pydantic ParameterModelCreates pydantic ParameterModel out of
exa.common.data.parameter.Parameter
instance- Parameters:
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- decode()#
Creates instance of
exa.common.data.parameter.Parameter
out of pydantic ParameterModel- Return type:
- classmethod encode(parameter)#
Creates pydantic ParameterModel out of
exa.common.data.parameter.Parameter
instance- Parameters:
parameter (Parameter) –
- Return type: