Home / File/ image04.py — fastapi Source File

image04.py — fastapi Source File

Architecture documentation for image04.py, a python file in the fastapi codebase. 2 imports, 0 dependents.

File python FastAPI Applications 2 imports 3 functions

Entity Profile

Dependency Diagram

graph LR
  37cec2a7_137f_b600_a0ec_080459d7a196["image04.py"]
  c16959b6_d471_41f8_1c0e_2c4fe324727a["subprocess"]
  37cec2a7_137f_b600_a0ec_080459d7a196 --> c16959b6_d471_41f8_1c0e_2c4fe324727a
  7d2fbdd6_32e3_8933_5a8e_c9c0b80bfd50["playwright.sync_api"]
  37cec2a7_137f_b600_a0ec_080459d7a196 --> 7d2fbdd6_32e3_8933_5a8e_c9c0b80bfd50
  style 37cec2a7_137f_b600_a0ec_080459d7a196 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import subprocess

from playwright.sync_api import Playwright, sync_playwright


# Run playwright codegen to generate the code below, copy paste the sections in run()
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_role("button", name="Item-Input").click()
    page.get_by_role("button", name="Item-Output").click()
    page.set_viewport_size({"width": 960, "height": 820})
    # Manually add the screenshot
    page.screenshot(
        path="docs/en/docs/img/tutorial/separate-openapi-schemas/image04.png"
    )
    # ---------------------
    context.close()
    browser.close()


process = subprocess.Popen(
    ["uvicorn", "docs_src.separate_openapi_schemas.tutorial001:app"]
)
try:
    with sync_playwright() as playwright:
        run(playwright)
finally:
    process.terminate()

Domain

Subdomains

Dependencies

  • playwright.sync_api
  • subprocess

Frequently Asked Questions

What does image04.py do?
image04.py is a source file in the fastapi codebase, written in python. It belongs to the FastAPI domain, Applications subdomain.
What functions are defined in image04.py?
image04.py defines 3 function(s): process, run, sync_playwright.
What does image04.py depend on?
image04.py imports 2 module(s): playwright.sync_api, subprocess.
Where is image04.py in the architecture?
image04.py is located at scripts/playwright/separate_openapi_schemas/image04.py (domain: FastAPI, subdomain: Applications, directory: scripts/playwright/separate_openapi_schemas).

Analyze Your Own Codebase

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

Try Supermodel Free