flowserv.model.parameter.factory module

Factory for parameter declarations. Allows to create instances of parameter declaration classes from dictionary serializations.

class flowserv.model.parameter.factory.ParameterDeserializer

Bases: object

Factory for parameter declarations from dictionary serializations. This class is merely a dispatcher that looks at the parameter type in a given serialization and calls the deserialization method of the respective parameter declaration class.

static from_dict(doc: Dict, validate: Optional[bool] = True) flowserv.model.parameter.base.Parameter

Create instance of parameter declaration class from a given dictionary serialization object.

Parameters
  • doc (dict) – Dictionary serialization for a parameter declaration.

  • validate (bool, default=True) – Validate given serialization if True.

Return type

flowserv.model.parameter.base.Parameter

Raises

flowserv.error.InvalidParameterError