flexmeasures.data.schemas.sensors
Classes
- class flexmeasures.data.schemas.sensors.SensorIdField(*args, **kwargs)
Field that deserializes to a Sensor and serializes back to an integer.
- class flexmeasures.data.schemas.sensors.SensorSchema(*args, **kwargs)
Sensor schema, with validations.
- opts: SchemaOpts = <flask_marshmallow.sqla.SQLAlchemySchemaOpts object>
- class flexmeasures.data.schemas.sensors.SensorSchemaMixin(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet = False, unknown: str | None = None)
Base sensor schema.
Here we include all fields which are implemented by timely_beliefs.SensorDBMixin All classes inheriting from timely beliefs sensor don’t need to repeat these. In a while, this schema can represent our unified Sensor class.
When subclassing, also subclass from ma.SQLAlchemySchema and add your own DB model class, e.g.:
- class Meta:
model = Asset