Debian Codegraph @

docs_src/query_params_str_validations/tutorial014_py310.py

raw
1 from fastapi import FastAPI, Query
2
3 app = FastAPI()
4
5
6 @app.get("/items/")
7 async def read_items(
8 hidden_query: str | None = Query(default=None, include_in_schema=False),
9 ):
10 if hidden_query:
11 return {"hidden_query": hidden_query}
12 else:
13 return {"hidden_query": "Not found"}