Home / Function/ get_client() — fastapi Function Reference

get_client() — fastapi Function Reference

Architecture documentation for the get_client() function in test_regex_deprecated_params.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  3e264647_060d_092b_b0c5_437ea40ab0e0["get_client()"]
  3115589e_a081_ce28_ae94_1ef83d2bd277["test_regex_deprecated_params.py"]
  3e264647_060d_092b_b0c5_437ea40ab0e0 -->|defined in| 3115589e_a081_ce28_ae94_1ef83d2bd277
  b54f72b3_ba32_0140_f8e4_f1041b3e5426["test_query_params_str_validations_no_query()"]
  b54f72b3_ba32_0140_f8e4_f1041b3e5426 -->|calls| 3e264647_060d_092b_b0c5_437ea40ab0e0
  8131d46e_7194_80c3_957a_6a6a3a200380["test_query_params_str_validations_q_fixedquery()"]
  8131d46e_7194_80c3_957a_6a6a3a200380 -->|calls| 3e264647_060d_092b_b0c5_437ea40ab0e0
  6a7d464b_0cc3_2d78_1eea_7c126ccfd17e["test_query_params_str_validations_item_query_nonregexquery()"]
  6a7d464b_0cc3_2d78_1eea_7c126ccfd17e -->|calls| 3e264647_060d_092b_b0c5_437ea40ab0e0
  69ce4c69_3855_e6a8_4b4b_af49123def0d["test_openapi_schema()"]
  69ce4c69_3855_e6a8_4b4b_af49123def0d -->|calls| 3e264647_060d_092b_b0c5_437ea40ab0e0
  style 3e264647_060d_092b_b0c5_437ea40ab0e0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_regex_deprecated_params.py lines 12–26

def get_client():
    app = FastAPI()
    with pytest.warns(FastAPIDeprecationWarning):

        @app.get("/items/")
        async def read_items(
            q: Annotated[str | None, Query(regex="^fixedquery$")] = None,
        ):
            if q:
                return f"Hello {q}"
            else:
                return "Hello World"

    client = TestClient(app)
    return client

Domain

Subdomains

Frequently Asked Questions

What does get_client() do?
get_client() is a function in the fastapi codebase, defined in tests/test_regex_deprecated_params.py.
Where is get_client() defined?
get_client() is defined in tests/test_regex_deprecated_params.py at line 12.
What calls get_client()?
get_client() is called by 4 function(s): test_openapi_schema, test_query_params_str_validations_item_query_nonregexquery, test_query_params_str_validations_no_query, test_query_params_str_validations_q_fixedquery.

Analyze Your Own Codebase

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

Try Supermodel Free