Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/eggplants/install-playwright-python

Execute `playwright install` from Python
https://github.com/eggplants/install-playwright-python

auto-installer playwright playwright-python python util

Last synced: 4 days ago
JSON representation

Execute `playwright install` from Python

Awesome Lists containing this project

README

        

# install-playwright-python

[![PyPI version](

)](

) [![Maintainability](

)](

) [![pre-commit.ci status](

)](

) [![Test Coverage](

)](

) [![Test](

)](

)

Execute [`playwright install`](https://playwright.dev/python/docs/cli) from Python.

```python
from install_playwright import install
```

```python
from playwright.sync_api import sync_playwright

with sync_playwright() as p:
install(p.chrome)
browser = p.chrome.launch()
# ...
```

```python
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

```bash
pip install install-playwright
```

## License

MIT