Home / File/ test_stringified_annotations_simple.py — fastapi Source File

test_stringified_annotations_simple.py — fastapi Source File

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

File python FastAPI Responses 4 imports 1 functions 1 classes

Entity Profile

Dependency Diagram

graph LR
  8859735d_9a43_06c7_fe45_c359c0595de6["test_stringified_annotations_simple.py"]
  8fd7072e_05b0_6622_0f14_e1e357032855["utils.py"]
  8859735d_9a43_06c7_fe45_c359c0595de6 --> 8fd7072e_05b0_6622_0f14_e1e357032855
  0dda2280_3359_8460_301c_e98c77e78185["typing"]
  8859735d_9a43_06c7_fe45_c359c0595de6 --> 0dda2280_3359_8460_301c_e98c77e78185
  534f6e44_61b8_3c38_8b89_6934a6df9802["__init__.py"]
  8859735d_9a43_06c7_fe45_c359c0595de6 --> 534f6e44_61b8_3c38_8b89_6934a6df9802
  a7c04dee_ee23_5891_b185_47ff6bed036d["testclient.py"]
  8859735d_9a43_06c7_fe45_c359c0595de6 --> a7c04dee_ee23_5891_b185_47ff6bed036d
  style 8859735d_9a43_06c7_fe45_c359c0595de6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

from __future__ import annotations

from typing import Annotated

from fastapi import Depends, FastAPI, Request
from fastapi.testclient import TestClient

from .utils import needs_py310


class Dep:
    def __call__(self, request: Request):
        return "test"


@needs_py310
def test_stringified_annotations():
    app = FastAPI()

    client = TestClient(app)

    @app.get("/test/")
    def call(test: Annotated[str, Depends(Dep())]):
        return {"test": test}

    response = client.get("/test")
    assert response.status_code == 200

Domain

Subdomains

Classes

Frequently Asked Questions

What does test_stringified_annotations_simple.py do?
test_stringified_annotations_simple.py is a source file in the fastapi codebase, written in python. It belongs to the FastAPI domain, Responses subdomain.
What functions are defined in test_stringified_annotations_simple.py?
test_stringified_annotations_simple.py defines 1 function(s): test_stringified_annotations.
What does test_stringified_annotations_simple.py depend on?
test_stringified_annotations_simple.py imports 4 module(s): __init__.py, testclient.py, typing, utils.py.
Where is test_stringified_annotations_simple.py in the architecture?
test_stringified_annotations_simple.py is located at tests/test_stringified_annotations_simple.py (domain: FastAPI, subdomain: Responses, directory: tests).

Analyze Your Own Codebase

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

Try Supermodel Free