Skip to content

eggplants/install-playwright-python

Repository files navigation

install-playwright-python

PyPI version Maintainability pre-commit.ci status Test Coverage Test

Execute playwright install from Python.

from install_playwright import install
from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    install(p.chrome)
    browser = p.chrome.launch()
    # ...
import asyncio
from playwright.async_api import async_playwright

async def main():
    async with async_playwright() as p:
        install(p.chrome)
        browser = await p.chrome.launch()
        # ...

Install

pip install install-playwright

License

MIT