Home / File/ param_functions.py — fastapi Source File

param_functions.py — fastapi Source File

Architecture documentation for param_functions.py, a python file in the fastapi codebase. 10 imports, 3 dependents.

File python FastAPI Routing 10 imports 3 dependents 9 functions

Entity Profile

Dependency Diagram

graph LR
  24a9a43e_697f_81ce_6a7c_28a423a6f93b["param_functions.py"]
  07d79a2e_d4e9_0bbb_be90_936274444c8c["collections.abc"]
  24a9a43e_697f_81ce_6a7c_28a423a6f93b --> 07d79a2e_d4e9_0bbb_be90_936274444c8c
  0dda2280_3359_8460_301c_e98c77e78185["typing"]
  24a9a43e_697f_81ce_6a7c_28a423a6f93b --> 0dda2280_3359_8460_301c_e98c77e78185
  5efacb44_5373_ceb9_9579_6e6603820488["annotated_doc"]
  24a9a43e_697f_81ce_6a7c_28a423a6f93b --> 5efacb44_5373_ceb9_9579_6e6603820488
  534f6e44_61b8_3c38_8b89_6934a6df9802["__init__.py"]
  24a9a43e_697f_81ce_6a7c_28a423a6f93b --> 534f6e44_61b8_3c38_8b89_6934a6df9802
  2bb4dd2d_8b8a_6502_751c_38eabb6ae71e["params.py"]
  24a9a43e_697f_81ce_6a7c_28a423a6f93b --> 2bb4dd2d_8b8a_6502_751c_38eabb6ae71e
  aac750d7_00e7_a28d_9e64_89918311078b["__init__.py"]
  24a9a43e_697f_81ce_6a7c_28a423a6f93b --> aac750d7_00e7_a28d_9e64_89918311078b
  7f688779_6b22_3c15_6514_97dec91c3c30["models.py"]
  24a9a43e_697f_81ce_6a7c_28a423a6f93b --> 7f688779_6b22_3c15_6514_97dec91c3c30
  0b3bd71a_a167_b489_3767_f34b70b7ddda["Example"]
  24a9a43e_697f_81ce_6a7c_28a423a6f93b --> 0b3bd71a_a167_b489_3767_f34b70b7ddda
  6913fbd4_39df_d14b_44bb_522e99b65b90["pydantic"]
  24a9a43e_697f_81ce_6a7c_28a423a6f93b --> 6913fbd4_39df_d14b_44bb_522e99b65b90
  87f0eda4_1c7f_c164_42ba_f715b8cf0a6b["typing_extensions"]
  24a9a43e_697f_81ce_6a7c_28a423a6f93b --> 87f0eda4_1c7f_c164_42ba_f715b8cf0a6b
  534f6e44_61b8_3c38_8b89_6934a6df9802["__init__.py"]
  534f6e44_61b8_3c38_8b89_6934a6df9802 --> 24a9a43e_697f_81ce_6a7c_28a423a6f93b
  efdd0530_d49f_83d3_f1d5_e8884b1b9602["oauth2.py"]
  efdd0530_d49f_83d3_f1d5_e8884b1b9602 --> 24a9a43e_697f_81ce_6a7c_28a423a6f93b
  9588c53b_26fc_238d_e474_2a9ae27eef2d["test_ambiguous_params.py"]
  9588c53b_26fc_238d_e474_2a9ae27eef2d --> 24a9a43e_697f_81ce_6a7c_28a423a6f93b
  style 24a9a43e_697f_81ce_6a7c_28a423a6f93b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

from collections.abc import Sequence
from typing import Annotated, Any, Callable, Optional, Union

from annotated_doc import Doc
from fastapi import params
from fastapi._compat import Undefined
from fastapi.openapi.models import Example
from pydantic import AliasChoices, AliasPath
from typing_extensions import Literal, deprecated

_Unset: Any = Undefined


def Path(  # noqa: N802
    default: Annotated[
        Any,
        Doc(
            """
            Default value if the parameter field is not set.

            This doesn't affect `Path` parameters as the value is always required.
            The parameter is available only for compatibility.
            """
        ),
    ] = ...,
    *,
    default_factory: Annotated[
        Union[Callable[[], Any], None],
        Doc(
            """
            A callable to generate the default value.

            This doesn't affect `Path` parameters as the value is always required.
            The parameter is available only for compatibility.
            """
        ),
    ] = _Unset,
    alias: Annotated[
        Optional[str],
        Doc(
            """
            An alternative name for the parameter field.

            This will be used to extract the data and for the generated OpenAPI.
            It is particularly useful when you can't use the name you want because it
            is a Python reserved keyword or similar.
            """
        ),
    ] = None,
    alias_priority: Annotated[
        Union[int, None],
        Doc(
            """
            Priority of the alias. This affects whether an alias generator is used.
            """
        ),
    ] = _Unset,
    validation_alias: Annotated[
        Union[str, AliasPath, AliasChoices, None],
        Doc(
// ... (2402 more lines)

Domain

Subdomains

Dependencies

Frequently Asked Questions

What does param_functions.py do?
param_functions.py is a source file in the fastapi codebase, written in python. It belongs to the FastAPI domain, Routing subdomain.
What functions are defined in param_functions.py?
param_functions.py defines 9 function(s): Body, Cookie, Depends, File, Form, Header, Path, Query, Security.
What does param_functions.py depend on?
param_functions.py imports 10 module(s): Example, __init__.py, __init__.py, annotated_doc, collections.abc, models.py, params.py, pydantic, and 2 more.
What files import param_functions.py?
param_functions.py is imported by 3 file(s): __init__.py, oauth2.py, test_ambiguous_params.py.
Where is param_functions.py in the architecture?
param_functions.py is located at fastapi/param_functions.py (domain: FastAPI, subdomain: Routing, directory: fastapi).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free