class MyModel(Collection): __collection__ = "MyCollection" _key = String() integer = Integer() datetime = DateTime() url = Url() bool_val = Boolean() str_list = List(String) floater = Float() date = Date() timedelta = TimeDelta() email = Email() number = Number() uuid = UUID() d = Dict()
class MyModel(Collection): __collection__ = "MyCollection" _key = String(allow_none=True) integer = Integer(allow_none=True) datetime = DateTime(allow_none=True) url = Url(allow_none=True) bool_val = Boolean(allow_none=True) str_list = List(String, allow_none=True) floater = Float(allow_none=True) date = Date(allow_none=True) timedelta = TimeDelta(allow_none=True) email = Email(allow_none=True) number = Number(allow_none=True) uuid = UUID(allow_none=True) d = Dict(allow_none=True)
class ResultMixin(CollectionBase): _key = String() _timestamp = DateTime() stats = String()
class Log(Collection): __collection__ = 'logs' _key = String(required=True) timestamp = DateTime() message = String()