mirror of
https://github.com/fastapi/fastapi.git
synced 2026-11-23 01:48:43 +08:00
10 lines
175 B
Python
10 lines
175 B
Python
from fastapi import FastAPI, Query
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/items/")
|
|
async def read_items(q: list = Query(default=[])):
|
|
query_items = {"q": q}
|
|
return query_items
|