image01.py — fastapi Source File
Architecture documentation for image01.py, a python file in the fastapi codebase. 4 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 7267af39_f279_9f47_10dd_c58a90e53052["image01.py"] c16959b6_d471_41f8_1c0e_2c4fe324727a["subprocess"] 7267af39_f279_9f47_10dd_c58a90e53052 --> c16959b6_d471_41f8_1c0e_2c4fe324727a 1f0e807e_8e8f_35d7_c6d0_300886df5c17["time"] 7267af39_f279_9f47_10dd_c58a90e53052 --> 1f0e807e_8e8f_35d7_c6d0_300886df5c17 d7bf38e8_5abd_e43f_3d05_a07033f7302e["httpx"] 7267af39_f279_9f47_10dd_c58a90e53052 --> d7bf38e8_5abd_e43f_3d05_a07033f7302e 7d2fbdd6_32e3_8933_5a8e_c9c0b80bfd50["playwright.sync_api"] 7267af39_f279_9f47_10dd_c58a90e53052 --> 7d2fbdd6_32e3_8933_5a8e_c9c0b80bfd50 style 7267af39_f279_9f47_10dd_c58a90e53052 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import subprocess
import time
import httpx
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_label("post /heroes/").click()
# Manually add the screenshot
page.screenshot(path="docs/en/docs/img/tutorial/sql-databases/image01.png")
# ---------------------
context.close()
browser.close()
process = subprocess.Popen(
["fastapi", "run", "docs_src/sql_databases/tutorial001.py"],
)
try:
for _ in range(3):
try:
response = httpx.get("http://localhost:8000/docs")
except httpx.ConnectError:
time.sleep(1)
break
with sync_playwright() as playwright:
run(playwright)
finally:
process.terminate()
Domain
Subdomains
Dependencies
- httpx
- playwright.sync_api
- subprocess
- time
Source
Frequently Asked Questions
What does image01.py do?
image01.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 image01.py?
image01.py defines 3 function(s): _, process, run.
What does image01.py depend on?
image01.py imports 4 module(s): httpx, playwright.sync_api, subprocess, time.
Where is image01.py in the architecture?
image01.py is located at scripts/playwright/sql_databases/image01.py (domain: FastAPI, subdomain: Applications, directory: scripts/playwright/sql_databases).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free