mirror of
https://github.com/rjNemo/fastapi
synced 2026-06-06 10:36:39 +00:00
9 lines
181 B
Python
9 lines
181 B
Python
from fastapi import FastAPI, Query
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/items/")
|
|
async def read_items(q: list[str] | None = Query(None)):
|
|
query_items = {"q": q}
|
|
return query_items
|