File: marshmallow.py

package info (click to toggle)
pytkdocs 0.16.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 784 kB
  • sloc: python: 4,621; makefile: 28; javascript: 13
file content (8 lines) | stat: -rw-r--r-- 301 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
from marshmallow import Schema, fields


class Person(Schema):
    """Simple Marshmallow Model for a person's information"""

    name: fields.Str = fields.Str(description="The person's name", required=True)
    age: fields.Int = fields.Int(description="The person's age which must be at minimum 18")