mirror of
https://github.com/rjNemo/fastapi
synced 2026-06-06 18:46:40 +00:00
11 lines
213 B
Python
11 lines
213 B
Python
from typing import Optional
|
|
|
|
from fastapi import FastAPI, Query
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/items/")
|
|
async def read_items(q: Optional[list[str]] = Query(None)):
|
|
query_items = {"q": q}
|
|
return query_items
|