utils.py — fastapi Source File
Architecture documentation for utils.py, a python file in the fastapi codebase. 2 imports, 25 dependents.
Entity Profile
Dependency Diagram
graph LR 8fd7072e_05b0_6622_0f14_e1e357032855["utils.py"] 65099b90_26c1_5db5_09e6_30dc0ea421e3["sys"] 8fd7072e_05b0_6622_0f14_e1e357032855 --> 65099b90_26c1_5db5_09e6_30dc0ea421e3 5befe8bf_65d1_d058_6b78_4a597a8488e9["pytest"] 8fd7072e_05b0_6622_0f14_e1e357032855 --> 5befe8bf_65d1_d058_6b78_4a597a8488e9 d8f09690_317a_a71d_db2f_7a9171e4e6fd["test_compat.py"] d8f09690_317a_a71d_db2f_7a9171e4e6fd --> 8fd7072e_05b0_6622_0f14_e1e357032855 91d1a80c_1c46_e7d1_13fc_d70d9ed094b5["test_pydantic_v1_error.py"] 91d1a80c_1c46_e7d1_13fc_d70d9ed094b5 --> 8fd7072e_05b0_6622_0f14_e1e357032855 8f2fab8a_e459_dbe9_dda2_fbbd4b149368["test_regex_deprecated_body.py"] 8f2fab8a_e459_dbe9_dda2_fbbd4b149368 --> 8fd7072e_05b0_6622_0f14_e1e357032855 3115589e_a081_ce28_ae94_1ef83d2bd277["test_regex_deprecated_params.py"] 3115589e_a081_ce28_ae94_1ef83d2bd277 --> 8fd7072e_05b0_6622_0f14_e1e357032855 fcd29191_bbfc_1eb6_fe6b_ff9e3a695a04["test_schema_compat_pydantic_v2.py"] fcd29191_bbfc_1eb6_fe6b_ff9e3a695a04 --> 8fd7072e_05b0_6622_0f14_e1e357032855 bae8b498_468b_a66a_cb3d_9e524bf05cc5["test_stringified_annotation_dependency_py314.py"] bae8b498_468b_a66a_cb3d_9e524bf05cc5 --> 8fd7072e_05b0_6622_0f14_e1e357032855 8859735d_9a43_06c7_fe45_c359c0595de6["test_stringified_annotations_simple.py"] 8859735d_9a43_06c7_fe45_c359c0595de6 --> 8fd7072e_05b0_6622_0f14_e1e357032855 71bd14d8_9f05_d098_7264_8cede8ecf8be["test_tutorial002.py"] 71bd14d8_9f05_d098_7264_8cede8ecf8be --> 8fd7072e_05b0_6622_0f14_e1e357032855 ed77216c_258c_abfb_5b79_7ecd59aa4d4f["test_tutorial004.py"] ed77216c_258c_abfb_5b79_7ecd59aa4d4f --> 8fd7072e_05b0_6622_0f14_e1e357032855 400a29c5_d6ee_1196_b925_90c464e42d36["test_tutorial001.py"] 400a29c5_d6ee_1196_b925_90c464e42d36 --> 8fd7072e_05b0_6622_0f14_e1e357032855 bf6cf455_2ef0_0aa6_ebfb_98b78d430460["test_tutorial002.py"] bf6cf455_2ef0_0aa6_ebfb_98b78d430460 --> 8fd7072e_05b0_6622_0f14_e1e357032855 9366c388_e453_2a05_2fe1_5bbfa144567e["test_tutorial001.py"] 9366c388_e453_2a05_2fe1_5bbfa144567e --> 8fd7072e_05b0_6622_0f14_e1e357032855 style 8fd7072e_05b0_6622_0f14_e1e357032855 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import sys
import pytest
needs_py39 = pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9+")
needs_py310 = pytest.mark.skipif(
sys.version_info < (3, 10), reason="requires python3.10+"
)
needs_py314 = pytest.mark.skipif(
sys.version_info < (3, 14), reason="requires python3.14+"
)
def skip_module_if_py_gte_314():
"""Skip entire module on Python 3.14+ at import time."""
if sys.version_info >= (3, 14):
pytest.skip("requires python3.13-", allow_module_level=True)
Domain
Subdomains
Functions
Dependencies
- pytest
- sys
Imported By
- tests/test_compat.py
- tests/test_pydantic_v1_error.py
- tests/test_regex_deprecated_body.py
- tests/test_regex_deprecated_params.py
- tests/test_schema_compat_pydantic_v2.py
- tests/test_stringified_annotation_dependency_py314.py
- tests/test_stringified_annotations_simple.py
- tests/test_tutorial/test_sql_databases/test_tutorial001.py
- tests/test_tutorial/test_query_param_models/test_tutorial001.py
- tests/test_tutorial/test_cookie_param_models/test_tutorial001.py
- tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py
- tests/test_tutorial/test_custom_request_and_route/test_tutorial001.py
- tests/test_tutorial/test_dataclasses/test_tutorial001.py
- tests/test_tutorial/test_header_param_models/test_tutorial001.py
- tests/test_tutorial/test_custom_request_and_route/test_tutorial002.py
- tests/test_tutorial/test_dataclasses/test_tutorial002.py
- tests/test_tutorial/test_header_param_models/test_tutorial002.py
- tests/test_tutorial/test_cookie_param_models/test_tutorial002.py
- tests/test_tutorial/test_query_param_models/test_tutorial002.py
- tests/test_tutorial/test_additional_responses/test_tutorial002.py
- tests/test_tutorial/test_sql_databases/test_tutorial002.py
- tests/test_tutorial/test_custom_request_and_route/test_tutorial003.py
- tests/test_tutorial/test_header_param_models/test_tutorial003.py
- tests/test_tutorial/test_additional_responses/test_tutorial004.py
- tests/test_typing_python39.py
Source
Frequently Asked Questions
What does utils.py do?
utils.py is a source file in the fastapi codebase, written in python. It belongs to the FastAPI domain, Applications subdomain.
What functions are defined in utils.py?
utils.py defines 1 function(s): skip_module_if_py_gte_314.
What does utils.py depend on?
utils.py imports 2 module(s): pytest, sys.
What files import utils.py?
utils.py is imported by 25 file(s): test_compat.py, test_pydantic_v1_error.py, test_regex_deprecated_body.py, test_regex_deprecated_params.py, test_schema_compat_pydantic_v2.py, test_stringified_annotation_dependency_py314.py, test_stringified_annotations_simple.py, test_tutorial001.py, and 17 more.
Where is utils.py in the architecture?
utils.py is located at tests/utils.py (domain: FastAPI, subdomain: Applications, directory: tests).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free