mirror of
https://github.com/fastapi/fastapi.git
synced 2026-04-08 00:50:39 -04:00
✨ Add docs and tests for Python 3.9 and Python 3.10 (#3712)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
This commit is contained in:
committed by
GitHub
parent
83f6781037
commit
d08a062ee2
13
docs_src/query_params/tutorial006b.py
Normal file
13
docs_src/query_params/tutorial006b.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from typing import Union
|
||||
|
||||
from fastapi import FastAPI
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
@app.get("/items/{item_id}")
|
||||
async def read_user_item(
|
||||
item_id: str, needy: str, skip: int = 0, limit: Union[int, None] = None
|
||||
):
|
||||
item = {"item_id": item_id, "needy": needy, "skip": skip, "limit": limit}
|
||||
return item
|
||||
Reference in New Issue
Block a user