Home / Function/ run() — fastapi Function Reference

run() — fastapi Function Reference

Architecture documentation for the run() function in image01.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  de089ca2_1f18_484b_802c_b63fe48bd679["run()"]
  132bbf6d_677d_98e8_d28e_c87c5f9c1c5b["image01.py"]
  de089ca2_1f18_484b_802c_b63fe48bd679 -->|defined in| 132bbf6d_677d_98e8_d28e_c87c5f9c1c5b
  21de0a8b_df7a_b8cb_08ee_d5c2a6173616["sync_playwright()"]
  21de0a8b_df7a_b8cb_08ee_d5c2a6173616 -->|calls| de089ca2_1f18_484b_802c_b63fe48bd679
  style de089ca2_1f18_484b_802c_b63fe48bd679 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/playwright/separate_openapi_schemas/image01.py lines 7–22

def run(playwright: Playwright) -> None:
    browser = playwright.chromium.launch(headless=False)
    # Update the viewport manually
    context = browser.new_context(viewport={"width": 960, "height": 1080})
    page = context.new_page()
    page.goto("http://localhost:8000/docs")
    page.get_by_text("POST/items/Create Item").click()
    page.get_by_role("tab", name="Schema").first.click()
    # Manually add the screenshot
    page.screenshot(
        path="docs/en/docs/img/tutorial/separate-openapi-schemas/image01.png"
    )

    # ---------------------
    context.close()
    browser.close()

Domain

Subdomains

Called By

Frequently Asked Questions

What does run() do?
run() is a function in the fastapi codebase, defined in scripts/playwright/separate_openapi_schemas/image01.py.
Where is run() defined?
run() is defined in scripts/playwright/separate_openapi_schemas/image01.py at line 7.
What calls run()?
run() is called by 1 function(s): sync_playwright.

Analyze Your Own Codebase

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

Try Supermodel Free