Home / File/ docs.py — fastapi Source File

docs.py — fastapi Source File

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

File python FastAPI Applications 17 imports 23 functions 1 classes

Entity Profile

Dependency Diagram

graph LR
  089911a1_02c3_0f6b_d62d_71c980ade67e["docs.py"]
  c1ef60e8_e635_2e82_29e5_a79e03e975d6["json"]
  089911a1_02c3_0f6b_d62d_71c980ade67e --> c1ef60e8_e635_2e82_29e5_a79e03e975d6
  a4a63925_76bf_e8a8_bef2_cb86d161a300["logging"]
  089911a1_02c3_0f6b_d62d_71c980ade67e --> a4a63925_76bf_e8a8_bef2_cb86d161a300
  af9b440f_13c4_d91e_f8ae_bfe199b060d2["os"]
  089911a1_02c3_0f6b_d62d_71c980ade67e --> af9b440f_13c4_d91e_f8ae_bfe199b060d2
  b423f231_0305_b686_5fea_7c66fe42f25b["re"]
  089911a1_02c3_0f6b_d62d_71c980ade67e --> b423f231_0305_b686_5fea_7c66fe42f25b
  879863b9_0db7_67c9_55cb_81a43a46d5ca["shutil"]
  089911a1_02c3_0f6b_d62d_71c980ade67e --> 879863b9_0db7_67c9_55cb_81a43a46d5ca
  c16959b6_d471_41f8_1c0e_2c4fe324727a["subprocess"]
  089911a1_02c3_0f6b_d62d_71c980ade67e --> c16959b6_d471_41f8_1c0e_2c4fe324727a
  3992ce67_bf75_9241_da59_11628e092da8["html.parser"]
  089911a1_02c3_0f6b_d62d_71c980ade67e --> 3992ce67_bf75_9241_da59_11628e092da8
  f3b77cac_d4ab_b776_eec9_3777104d2c83["http.server"]
  089911a1_02c3_0f6b_d62d_71c980ade67e --> f3b77cac_d4ab_b776_eec9_3777104d2c83
  ed2904fb_d293_f9cf_11eb_f909a82a2901["multiprocessing"]
  089911a1_02c3_0f6b_d62d_71c980ade67e --> ed2904fb_d293_f9cf_11eb_f909a82a2901
  b3e303a2_3f2d_638d_930c_3a5dcc2f5a42["pathlib"]
  089911a1_02c3_0f6b_d62d_71c980ade67e --> b3e303a2_3f2d_638d_930c_3a5dcc2f5a42
  0dda2280_3359_8460_301c_e98c77e78185["typing"]
  089911a1_02c3_0f6b_d62d_71c980ade67e --> 0dda2280_3359_8460_301c_e98c77e78185
  7f90cc8d_f24b_a658_f3d2_067a713930a8["mkdocs.utils"]
  089911a1_02c3_0f6b_d62d_71c980ade67e --> 7f90cc8d_f24b_a658_f3d2_067a713930a8
  a73533d9_0a96_e8d9_5dcf_b4fd5359ebb5["typer"]
  089911a1_02c3_0f6b_d62d_71c980ade67e --> a73533d9_0a96_e8d9_5dcf_b4fd5359ebb5
  67785272_06f8_d6cb_1f4a_abf8bc11d004["yaml"]
  089911a1_02c3_0f6b_d62d_71c980ade67e --> 67785272_06f8_d6cb_1f4a_abf8bc11d004
  style 089911a1_02c3_0f6b_d62d_71c980ade67e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import json
import logging
import os
import re
import shutil
import subprocess
from html.parser import HTMLParser
from http.server import HTTPServer, SimpleHTTPRequestHandler
from multiprocessing import Pool
from pathlib import Path
from typing import Any, Optional, Union

import mkdocs.utils
import typer
import yaml
from jinja2 import Template
from ruff.__main__ import find_ruff_bin
from slugify import slugify as py_slugify

logging.basicConfig(level=logging.INFO)

SUPPORTED_LANGS = {
    "de",
    "en",
    "es",
    "fr",
    "ja",
    "ko",
    "pt",
    "ru",
    "tr",
    "uk",
    "zh",
    "zh-hant",
}


app = typer.Typer()

mkdocs_name = "mkdocs.yml"

missing_translation_snippet = """
{!../../docs/missing-translation.md!}
"""

non_translated_sections = (
    f"reference{os.sep}",
    "release-notes.md",
    "fastapi-people.md",
    "external-links.md",
    "newsletter.md",
    "management-tasks.md",
    "management.md",
    "contributing.md",
)

docs_path = Path("docs")
en_docs_path = Path("docs/en")
en_config_path: Path = en_docs_path / mkdocs_name
site_path = Path("site").absolute()
// ... (468 more lines)

Domain

Subdomains

Dependencies

  • html.parser
  • http.server
  • jinja2
  • json
  • logging
  • mkdocs.utils
  • multiprocessing
  • os
  • pathlib
  • re
  • ruff.__main__
  • shutil
  • slugify
  • subprocess
  • typer
  • typing
  • yaml

Frequently Asked Questions

What does docs.py do?
docs.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 docs.py?
docs.py defines 23 function(s): add_permalinks, add_permalinks_page, add_permalinks_pages, app, build_all, build_lang, callback, complete_existing_lang, ensure_non_translated, generate_docs_src_versions_for_file, and 13 more.
What does docs.py depend on?
docs.py imports 17 module(s): html.parser, http.server, jinja2, json, logging, mkdocs.utils, multiprocessing, os, and 9 more.
Where is docs.py in the architecture?
docs.py is located at scripts/docs.py (domain: FastAPI, subdomain: Applications, directory: scripts).

Analyze Your Own Codebase

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

Try Supermodel Free