test_orjson_response_class.py — fastapi Source File
Architecture documentation for test_orjson_response_class.py, a python file in the fastapi codebase. 5 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 0159a0e6_ccfe_7188_f02d_6b0d9160237c["test_orjson_response_class.py"] 534f6e44_61b8_3c38_8b89_6934a6df9802["__init__.py"] 0159a0e6_ccfe_7188_f02d_6b0d9160237c --> 534f6e44_61b8_3c38_8b89_6934a6df9802 967b6712_70e2_f5fa_f671_7c149857a445["responses.py"] 0159a0e6_ccfe_7188_f02d_6b0d9160237c --> 967b6712_70e2_f5fa_f671_7c149857a445 f080f95d_ad17_d10d_e952_737f94a8b094["ORJSONResponse"] 0159a0e6_ccfe_7188_f02d_6b0d9160237c --> f080f95d_ad17_d10d_e952_737f94a8b094 a7c04dee_ee23_5891_b185_47ff6bed036d["testclient.py"] 0159a0e6_ccfe_7188_f02d_6b0d9160237c --> a7c04dee_ee23_5891_b185_47ff6bed036d 6798f9ed_3b5e_efd3_7b26_43d9ab7346c6["sqlalchemy.sql.elements"] 0159a0e6_ccfe_7188_f02d_6b0d9160237c --> 6798f9ed_3b5e_efd3_7b26_43d9ab7346c6 style 0159a0e6_ccfe_7188_f02d_6b0d9160237c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
from fastapi import FastAPI
from fastapi.responses import ORJSONResponse
from fastapi.testclient import TestClient
from sqlalchemy.sql.elements import quoted_name
app = FastAPI(default_response_class=ORJSONResponse)
@app.get("/orjson_non_str_keys")
def get_orjson_non_str_keys():
key = quoted_name(value="msg", quote=False)
return {key: "Hello World", 1: 1}
client = TestClient(app)
def test_orjson_non_str_keys():
with client:
response = client.get("/orjson_non_str_keys")
assert response.json() == {"msg": "Hello World", "1": 1}
Domain
Subdomains
Dependencies
- ORJSONResponse
- __init__.py
- responses.py
- sqlalchemy.sql.elements
- testclient.py
Source
Frequently Asked Questions
What does test_orjson_response_class.py do?
test_orjson_response_class.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_orjson_response_class.py?
test_orjson_response_class.py defines 2 function(s): get_orjson_non_str_keys, test_orjson_non_str_keys.
What does test_orjson_response_class.py depend on?
test_orjson_response_class.py imports 5 module(s): ORJSONResponse, __init__.py, responses.py, sqlalchemy.sql.elements, testclient.py.
Where is test_orjson_response_class.py in the architecture?
test_orjson_response_class.py is located at tests/test_orjson_response_class.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