<gh_stars>1-10
from mongoengine import Document, StringField, UUIDField
import datetime
import uuid

sensorCatalog = ('moisture',
                 'humidity',
                 'light')


class Sensor(Document):
    uuid = UUIDField(required=True, default=lambda: str(
        uuid.uuid4()), binary=False)
    telemetric = StringField(required=True, choices=sensorCatalog)
    username = StringField(required=True)

from mongoengine import Document, StringField, UUIDField
import datetime
import uuid

sensorCatalog = ('moisture',
                 'humidity',
                 'light')


class Sensor(Document):
    uuid = UUIDField(required=True, default=lambda: str(
        uuid.uuid4()), binary=False)
    telemetric = StringField(required=True, choices=sensorCatalog)
    username = StringField(required=True)