powermeter/app/schemas/consumption.py

13 lines
236 B
Python

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()