mirror of
https://github.com/fastapi/fastapi.git
synced 2026-09-14 13:36:21 +08:00
00e2e544c7
for tutorial files
10 lines
243 B
Python
10 lines
243 B
Python
from fastapi import FastAPI
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/users/{user_id}/items/{item_id}")
|
|
async def read_user_item(user_id: int, item_id: str, needy: str):
|
|
item = {"item_id": item_id, "owner_id": user_id, "needy": needy}
|
|
return item
|