mirror of
https://github.com/fastapi/fastapi.git
synced 2026-11-21 10:13:53 +08:00
12 lines
210 B
Python
12 lines
210 B
Python
from typing import Annotated
|
|
|
|
from fastapi import FastAPI, Query
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/items/")
|
|
async def read_items(q: Annotated[list, Query()] = []):
|
|
query_items = {"q": q}
|
|
return query_items
|