Home / Function/ get_updated_config_content() — fastapi Function Reference

get_updated_config_content() — fastapi Function Reference

Architecture documentation for the get_updated_config_content() function in docs.py from the fastapi codebase.

Function python FastAPI Applications calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  510221b2_6268_2b2a_8fa6_14408275962d["get_updated_config_content()"]
  089911a1_02c3_0f6b_d62d_71c980ade67e["docs.py"]
  510221b2_6268_2b2a_8fa6_14408275962d -->|defined in| 089911a1_02c3_0f6b_d62d_71c980ade67e
  94647f4e_574e_b56c_5e99_8caf1b29664e["update_languages()"]
  94647f4e_574e_b56c_5e99_8caf1b29664e -->|calls| 510221b2_6268_2b2a_8fa6_14408275962d
  359364d4_2778_7625_3077_baf81c31da27["get_en_config()"]
  510221b2_6268_2b2a_8fa6_14408275962d -->|calls| 359364d4_2778_7625_3077_baf81c31da27
  7057f227_6b9c_6d7e_0958_8e852a5a06e4["get_lang_paths()"]
  510221b2_6268_2b2a_8fa6_14408275962d -->|calls| 7057f227_6b9c_6d7e_0958_8e852a5a06e4
  style 510221b2_6268_2b2a_8fa6_14408275962d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/docs.py lines 343–373

def get_updated_config_content() -> dict[str, Any]:
    config = get_en_config()
    languages = [{"en": "/"}]
    new_alternate: list[dict[str, str]] = []
    # Language names sourced from https://quickref.me/iso-639-1
    # Contributors may wish to update or change these, e.g. to fix capitalization.
    language_names_path = Path(__file__).parent / "../docs/language_names.yml"
    local_language_names: dict[str, str] = mkdocs.utils.yaml_load(
        language_names_path.read_text(encoding="utf-8")
    )
    for lang_path in get_lang_paths():
        if lang_path.name in {"en", "em"} or not lang_path.is_dir():
            continue
        if lang_path.name not in SUPPORTED_LANGS:
            # Skip languages that are not yet ready
            continue
        code = lang_path.name
        languages.append({code: f"/{code}/"})
    for lang_dict in languages:
        code = list(lang_dict.keys())[0]
        url = lang_dict[code]
        if code not in local_language_names:
            print(
                f"Missing language name for: {code}, "
                "update it in docs/language_names.yml"
            )
            raise typer.Abort()
        use_name = f"{code} - {local_language_names[code]}"
        new_alternate.append({"link": url, "name": use_name})
    config["extra"]["alternate"] = new_alternate
    return config

Domain

Subdomains

Defined In

Called By

Frequently Asked Questions

What does get_updated_config_content() do?
get_updated_config_content() is a function in the fastapi codebase, defined in scripts/docs.py.
Where is get_updated_config_content() defined?
get_updated_config_content() is defined in scripts/docs.py at line 343.
What does get_updated_config_content() call?
get_updated_config_content() calls 2 function(s): get_en_config, get_lang_paths.
What calls get_updated_config_content()?
get_updated_config_content() is called by 1 function(s): update_languages.

Analyze Your Own Codebase

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

Try Supermodel Free