Skip to content

Instantly share code, notes, and snippets.

@elijahbenizzy
Created July 4, 2024 23:20
Show Gist options
  • Save elijahbenizzy/b3d26ec6b4e6179b1b06c127536886b9 to your computer and use it in GitHub Desktop.
Save elijahbenizzy/b3d26ec6b4e6179b1b06c127536886b9 to your computer and use it in GitHub Desktop.
@app.get("/")
def read_root():
return {"Hello": "World"}
@app.get("/items/{item_id}")
def read_item(item_id: int, q: Union[str, None] = None):
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