Created
May 10, 2022 15:50
-
-
Save Joaopcamposs/07ce488203383f6c8171a53b6cbdc35a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# schemas.py | |
from pydantic import BaseModel | |
# To support creation and update APIs | |
class CreateAndUpdateUser(BaseModel): | |
name: str | |
email: str | |
password: str | |
# To support list and get APIs | |
class Users(CreateAndUpdateUser): | |
id: int | |
class Config: | |
orm_mode = True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment