Home / Function/ update_content() — fastapi Function Reference

update_content() — fastapi Function Reference

Architecture documentation for the update_content() function in contributors.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  9b2f18cc_2f02_7681_cb1c_129629470781["update_content()"]
  cf4b5bfd_e515_e220_1b74_2b9dbfada762["contributors.py"]
  9b2f18cc_2f02_7681_cb1c_129629470781 -->|defined in| cf4b5bfd_e515_e220_1b74_2b9dbfada762
  33126480_1652_4075_be09_22addb8f6752["main()"]
  33126480_1652_4075_be09_22addb8f6752 -->|calls| 9b2f18cc_2f02_7681_cb1c_129629470781
  style 9b2f18cc_2f02_7681_cb1c_129629470781 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/contributors.py lines 226–235

def update_content(*, content_path: Path, new_content: Any) -> bool:
    old_content = content_path.read_text(encoding="utf-8")

    new_content = yaml.dump(new_content, sort_keys=False, width=200, allow_unicode=True)
    if old_content == new_content:
        logging.info(f"The content hasn't changed for {content_path}")
        return False
    content_path.write_text(new_content, encoding="utf-8")
    logging.info(f"Updated {content_path}")
    return True

Domain

Subdomains

Called By

Frequently Asked Questions

What does update_content() do?
update_content() is a function in the fastapi codebase, defined in scripts/contributors.py.
Where is update_content() defined?
update_content() is defined in scripts/contributors.py at line 226.
What calls update_content()?
update_content() is called by 1 function(s): main.

Analyze Your Own Codebase

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

Try Supermodel Free