class PersonSchema(rest.Schema): first_name = rest.String() last_name = rest.String() dob = rest.DateTime()
class UserSchema(rest.Schema): id = rest.String() name = rest.String()
class RegexSchema(rest.Schema): zip_code = rest.String( validators=[rest.regex('[0-9]{5}', 'not a valid Zip')]) state = rest.String( validators=[rest.regex('[A-Z]{2}', 'not a valid State')])
class FriendSchema(rest.Schema): name = rest.String() age = rest.Int()
class LengthSchema(rest.Schema): min_field = rest.String(validators=[rest.length(min=4)]) max_field = rest.String(validators=[rest.length(max=2)])
class CoolSchema(rest.Schema): name = rest.String(validators=[rest.required])
class NameSchema(rest.Schema): first_name = rest.String() last_name = rest.String()
class PersonSchema(rest.Schema): first_name = rest.String(default='John') last_name = rest.String(default='Doe') money = rest.Dollars(default='10')
class CSVSchema(Schema): dog_type = rest.String(validators=[rest.nonempty]) food = rest.String(validators=[rest.nonempty]) pounds = rest.Int()