Home / File/ tutorial002_py39.py — fastapi Source File

tutorial002_py39.py — fastapi Source File

Architecture documentation for tutorial002_py39.py, a python file in the fastapi codebase. 2 imports, 1 dependents.

File python FastAPI Applications 2 imports 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  dd3c438d_b6cb_7cd8_19a0_9f941f6a2834["tutorial002_py39.py"]
  534f6e44_61b8_3c38_8b89_6934a6df9802["__init__.py"]
  dd3c438d_b6cb_7cd8_19a0_9f941f6a2834 --> 534f6e44_61b8_3c38_8b89_6934a6df9802
  41d904cd_ce42_61b6_6270_3da567fe9e6f["trustedhost.py"]
  dd3c438d_b6cb_7cd8_19a0_9f941f6a2834 --> 41d904cd_ce42_61b6_6270_3da567fe9e6f
  a8783e5d_1012_2aa0_e8e7_e51eb2369bee["test_tutorial002.py"]
  a8783e5d_1012_2aa0_e8e7_e51eb2369bee --> dd3c438d_b6cb_7cd8_19a0_9f941f6a2834
  style dd3c438d_b6cb_7cd8_19a0_9f941f6a2834 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

from fastapi import FastAPI
from fastapi.middleware.trustedhost import TrustedHostMiddleware

app = FastAPI()

app.add_middleware(
    TrustedHostMiddleware, allowed_hosts=["example.com", "*.example.com"]
)


@app.get("/")
async def main():
    return {"message": "Hello World"}

Domain

Subdomains

Functions

Frequently Asked Questions

What does tutorial002_py39.py do?
tutorial002_py39.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 tutorial002_py39.py?
tutorial002_py39.py defines 1 function(s): main.
What does tutorial002_py39.py depend on?
tutorial002_py39.py imports 2 module(s): __init__.py, trustedhost.py.
What files import tutorial002_py39.py?
tutorial002_py39.py is imported by 1 file(s): test_tutorial002.py.
Where is tutorial002_py39.py in the architecture?
tutorial002_py39.py is located at docs_src/advanced_middleware/tutorial002_py39.py (domain: FastAPI, subdomain: Applications, directory: docs_src/advanced_middleware).

Analyze Your Own Codebase

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

Try Supermodel Free