Home / Function/ deep_dict_update() — fastapi Function Reference

deep_dict_update() — fastapi Function Reference

Architecture documentation for the deep_dict_update() function in utils.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  8250eca3_9d70_6988_b118_334004d360bb["deep_dict_update()"]
  1c2c0e68_6ed1_7632_8c35_00818f97b599["utils.py"]
  8250eca3_9d70_6988_b118_334004d360bb -->|defined in| 1c2c0e68_6ed1_7632_8c35_00818f97b599
  200f313e_38b9_296f_f9aa_afdeacb6b8ad["get_openapi_path()"]
  200f313e_38b9_296f_f9aa_afdeacb6b8ad -->|calls| 8250eca3_9d70_6988_b118_334004d360bb
  style 8250eca3_9d70_6988_b118_334004d360bb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

fastapi/utils.py lines 105–120

def deep_dict_update(main_dict: dict[Any, Any], update_dict: dict[Any, Any]) -> None:
    for key, value in update_dict.items():
        if (
            key in main_dict
            and isinstance(main_dict[key], dict)
            and isinstance(value, dict)
        ):
            deep_dict_update(main_dict[key], value)
        elif (
            key in main_dict
            and isinstance(main_dict[key], list)
            and isinstance(update_dict[key], list)
        ):
            main_dict[key] = main_dict[key] + update_dict[key]
        else:
            main_dict[key] = value

Domain

Subdomains

Defined In

Called By

Frequently Asked Questions

What does deep_dict_update() do?
deep_dict_update() is a function in the fastapi codebase, defined in fastapi/utils.py.
Where is deep_dict_update() defined?
deep_dict_update() is defined in fastapi/utils.py at line 105.
What calls deep_dict_update()?
deep_dict_update() is called by 1 function(s): get_openapi_path.

Analyze Your Own Codebase

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

Try Supermodel Free