Home / File/ test_dependency_pep695.py — fastapi Source File

test_dependency_pep695.py — fastapi Source File

Architecture documentation for test_dependency_pep695.py, a python file in the fastapi codebase. 4 imports, 0 dependents.

File python FastAPI Routing 4 imports 2 functions

Entity Profile

Dependency Diagram

graph LR
  3ed0b356_2c74_0018_a986_ca80501a1c0a["test_dependency_pep695.py"]
  0dda2280_3359_8460_301c_e98c77e78185["typing"]
  3ed0b356_2c74_0018_a986_ca80501a1c0a --> 0dda2280_3359_8460_301c_e98c77e78185
  534f6e44_61b8_3c38_8b89_6934a6df9802["__init__.py"]
  3ed0b356_2c74_0018_a986_ca80501a1c0a --> 534f6e44_61b8_3c38_8b89_6934a6df9802
  a7c04dee_ee23_5891_b185_47ff6bed036d["testclient.py"]
  3ed0b356_2c74_0018_a986_ca80501a1c0a --> a7c04dee_ee23_5891_b185_47ff6bed036d
  87f0eda4_1c7f_c164_42ba_f715b8cf0a6b["typing_extensions"]
  3ed0b356_2c74_0018_a986_ca80501a1c0a --> 87f0eda4_1c7f_c164_42ba_f715b8cf0a6b
  style 3ed0b356_2c74_0018_a986_ca80501a1c0a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

from typing import Annotated

from fastapi import Depends, FastAPI
from fastapi.testclient import TestClient
from typing_extensions import TypeAliasType


async def some_value() -> int:
    return 123


DependedValue = TypeAliasType(
    "DependedValue", Annotated[int, Depends(some_value)], type_params=()
)


def test_pep695_type_dependencies():
    app = FastAPI()

    @app.get("/")
    async def get_with_dep(value: DependedValue) -> str:  # noqa
        return f"value: {value}"

    client = TestClient(app)
    response = client.get("/")
    assert response.status_code == 200
    assert response.text == '"value: 123"'

Domain

Subdomains

Dependencies

Frequently Asked Questions

What does test_dependency_pep695.py do?
test_dependency_pep695.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 test_dependency_pep695.py?
test_dependency_pep695.py defines 2 function(s): some_value, test_pep695_type_dependencies.
What does test_dependency_pep695.py depend on?
test_dependency_pep695.py imports 4 module(s): __init__.py, testclient.py, typing, typing_extensions.
Where is test_dependency_pep695.py in the architecture?
test_dependency_pep695.py is located at tests/test_dependency_pep695.py (domain: FastAPI, subdomain: Routing, directory: tests).

Analyze Your Own Codebase

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

Try Supermodel Free