Skip to content

Instantly share code, notes, and snippets.

@Mgancita
Last active February 13, 2022 19:58
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 Mgancita/5d7ff564b8aa8908b54286b296daa1a2 to your computer and use it in GitHub Desktop.
Save Mgancita/5d7ff564b8aa8908b54286b296daa1a2 to your computer and use it in GitHub Desktop.
from typing import Optional
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def hello():
return {"Hello": "World"}
@app.get("/items/{item_id}")
def read_item(item_id: int):
return {"item_id": item_id, "q": q}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment