Home / Function/ run() — fastapi Function Reference

run() — fastapi Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  908d4b3e_9ec2_a113_24c8_2410f5a61203["run()"]
  e695ead1_f144_fdbf_23d0_8c533578d5a1["image03.py"]
  908d4b3e_9ec2_a113_24c8_2410f5a61203 -->|defined in| e695ead1_f144_fdbf_23d0_8c533578d5a1
  2dea4047_fbee_cd81_a94b_29807940d724["sync_playwright()"]
  2dea4047_fbee_cd81_a94b_29807940d724 -->|calls| 908d4b3e_9ec2_a113_24c8_2410f5a61203
  style 908d4b3e_9ec2_a113_24c8_2410f5a61203 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/playwright/separate_openapi_schemas/image03.py lines 7–23

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("GET/items/Read Items").click()
    page.get_by_role("tab", name="Schema").click()
    page.get_by_label("Schema").get_by_role("button", name="Expand all").click()
    # Manually add the screenshot
    page.screenshot(
        path="docs/en/docs/img/tutorial/separate-openapi-schemas/image03.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/image03.py.
Where is run() defined?
run() is defined in scripts/playwright/separate_openapi_schemas/image03.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