MCPcopy Index your code
hub / github.com/fastapi/fastapi / Query

Class Query

fastapi/params.py:221–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219
220
221class Query(Param): # type: ignore[misc]
222 in_ = ParamTypes.query
223
224 def __init__(
225 self,
226 default: Any = Undefined,
227 *,
228 default_factory: Callable[[], Any] | None = _Unset,
229 annotation: Any | None = None,
230 alias: str | None = None,
231 alias_priority: int | None = _Unset,
232 validation_alias: str | AliasPath | AliasChoices | None = None,
233 serialization_alias: str | None = None,
234 title: str | None = None,
235 description: str | None = None,
236 gt: float | None = None,
237 ge: float | None = None,
238 lt: float | None = None,
239 le: float | None = None,
240 min_length: int | None = None,
241 max_length: int | None = None,
242 pattern: str | None = None,
243 regex: Annotated[
244 str | None,
245 deprecated(
246 "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."
247 ),
248 ] = None,
249 discriminator: str | None = None,
250 strict: bool | None = _Unset,
251 multiple_of: float | None = _Unset,
252 allow_inf_nan: bool | None = _Unset,
253 max_digits: int | None = _Unset,
254 decimal_places: int | None = _Unset,
255 examples: list[Any] | None = None,
256 example: Annotated[
257 Any | None,
258 deprecated(
259 "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "
260 "although still supported. Use examples instead."
261 ),
262 ] = _Unset,
263 openapi_examples: dict[str, Example] | None = None,
264 deprecated: deprecated | str | bool | None = None,
265 include_in_schema: bool = True,
266 json_schema_extra: dict[str, Any] | None = None,
267 **extra: Any,
268 ):
269 super().__init__(
270 default=default,
271 default_factory=default_factory,
272 annotation=annotation,
273 alias=alias,
274 alias_priority=alias_priority,
275 validation_alias=validation_alias,
276 serialization_alias=serialization_alias,
277 title=title,
278 description=description,

Callers 15

read_heroesFunction · 0.90
read_heroesFunction · 0.90
read_heroesFunction · 0.90
read_heroesFunction · 0.90
get_cookie_or_tokenFunction · 0.90
get_cookie_or_tokenFunction · 0.90
read_itemsFunction · 0.90
read_itemsFunction · 0.90
read_itemsFunction · 0.90
read_itemsFunction · 0.90
read_itemsFunction · 0.90
read_itemsFunction · 0.90

Calls

no outgoing calls

Tested by 15

read_explicit_queryFunction · 0.72
hidden_queryFunction · 0.72
defaultFunction · 0.72
requiredFunction · 0.72
multipleFunction · 0.72
testFunction · 0.72
query_model_with_extraFunction · 0.72
query_examplesFunction · 0.72
read_itemsFunction · 0.72
getFunction · 0.72
_get_client_keyFunction · 0.72
_get_client_tagFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…