powermeter/app/schemas/consumption.py

14 lines
236 B
Python
Raw Normal View History

2021-01-24 13:58:29 +01:00
from .. import ma
from marshmallow import fields
class ConsumptionQuerySchema(ma.Schema):
class Meta:
strict = True
timeperiod = fields.String()
class ConsumptionSchema(ma.Schema):
consumption = fields.Number()