flexmeasures.data.schemas.assets

Classes

class flexmeasures.data.schemas.assets.AssetSchema(*args, **kwargs)

Asset schema, with validations.

TODO: deprecate, as it is based on legacy data model. Move some attributes to SensorSchema.

class Meta
model

alias of Asset

opts: SchemaOpts = <flask_marshmallow.sqla.SQLAlchemySchemaOpts object>
class flexmeasures.data.schemas.assets.LatitudeField(*args, **kwargs)

Field that deserializes to a latitude float with max 7 decimal places.

__init__(*args, **kwargs)
class flexmeasures.data.schemas.assets.LatitudeLongitudeValidator(*, error: str | None = None)

Validator which succeeds if the value passed has at most 7 decimal places.

__init__(*, error: str | None = None)
class flexmeasures.data.schemas.assets.LatitudeValidator(*, error: str | None = None, allow_none: bool = False)

Validator which succeeds if the value passed is in the range [-90, 90].

__init__(*, error: str | None = None, allow_none: bool = False)
class flexmeasures.data.schemas.assets.LongitudeField(*args, **kwargs)

Field that deserializes to a longitude float with max 7 decimal places.

__init__(*args, **kwargs)
class flexmeasures.data.schemas.assets.LongitudeValidator(*, error: str | None = None, allow_none: bool = False)

Validator which succeeds if the value passed is in the range [-180, 180].

__init__(*, error: str | None = None, allow_none: bool = False)