Skip to content

Instantly share code, notes, and snippets.

@MartinThoma
Created November 1, 2020 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MartinThoma/585b56d4a064ef3cd250fca52b29ec91 to your computer and use it in GitHub Desktop.
Save MartinThoma/585b56d4a064ef3cd250fca52b29ec91 to your computer and use it in GitHub Desktop.
class Person(BaseModel):
id: PersonId
name: str
bank_account: Decimal
birthdate: datetime.date
friends: Optional[List[PersonId]] = None
class Config:
extra = "forbid"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment