Skip to content

Instantly share code, notes, and snippets.


cosmic-cortex/ Secret

Last active May 29, 2020
What would you like to do?
from fastapi import FastAPI
from pydantic import BaseModel
class User(BaseModel):
email: str
password: str
app = FastAPI()"/login")
def login(user: User):
# ...
# do some magic
# ...
return {"msg": "login successful"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment