def TestModelTwo():
"""Provides a test model without a range key"""
if 'marshmallow' in (os.getenv('SERIALIZATION_PKG') or ''):
from marshmallow import fields
class TestModelTwo(DynaModel):
class Table:
name = 'peanut-butter'
hash_key = 'foo'
read = 5
write = 5
class Schema:
foo = fields.String(required=True)
bar = fields.String()
baz = fields.String()
else:
from schematics import types
class TestModelTwo(DynaModel):
class Table:
name = 'peanut-butter'
hash_key = 'foo'
read = 5
write = 5
class Schema:
foo = types.StringType(required=True)
bar = types.StringType()
baz = types.StringType()
return TestModelTwo
评论列表
文章目录