flexmeasures.data.models.validation_utils
Functions
- flexmeasures.data.models.validation_utils.check_required_attributes(sensor: Sensor, attributes: list[str | tuple[str, Type | tuple[Type, ...]]])
Raises if any attribute in the list of attributes is missing on the Sensor, or has the wrong type.
- Parameters:
sensor – Sensor object to check for attributes
attributes – List of either an attribute name or a tuple of an attribute name and its allowed type (the allowed type may also be a tuple of several allowed types)
Exceptions
- exception flexmeasures.data.models.validation_utils.MissingAttributeException
- exception flexmeasures.data.models.validation_utils.WrongTypeAttributeException