Skip to main content

A high-level API to automate web browsers

Project description

🎭 Playwright for Python PyPI version Anaconda version Join Slack

Playwright is a Python library to automate Chromium, Firefox and WebKit browsers with a single API. Playwright delivers automation that is ever-green, capable, reliable and fast. See how Playwright is better.

Linux macOS Windows
Chromium 112.0.5615.29
WebKit 16.4
Firefox 111.0

Documentation

https://playwright.dev/python/docs/intro

API Reference

https://playwright.dev/python/docs/api/class-playwright

Example

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    for browser_type in [p.chromium, p.firefox, p.webkit]:
        browser = browser_type.launch()
        page = browser.new_page()
        page.goto('http://whatsmyuseragent.org/')
        page.screenshot(path=f'example-{browser_type.name}.png')
        browser.close()
import asyncio
from playwright.async_api import async_playwright

async def main():
    async with async_playwright() as p:
        for browser_type in [p.chromium, p.firefox, p.webkit]:
            browser = await browser_type.launch()
            page = await browser.new_page()
            await page.goto('http://whatsmyuseragent.org/')
            await page.screenshot(path=f'example-{browser_type.name}.png')
            await browser.close()

asyncio.run(main())

Other languages

More comfortable in another programming language? Playwright is also available in

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

playwright-1.32.1-py3-none-win_amd64.whl (29.0 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.32.1-py3-none-win32.whl (29.0 MB view details)

Uploaded Python 3 Windows x86

playwright-1.32.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (35.1 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.32.1-py3-none-manylinux1_x86_64.whl (35.2 MB view details)

Uploaded Python 3

playwright-1.32.1-py3-none-macosx_11_0_universal2.whl (32.9 MB view details)

Uploaded Python 3 macOS 11.0+ universal2 (ARM64, x86-64)

playwright-1.32.1-py3-none-macosx_11_0_arm64.whl (31.2 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.32.1-py3-none-macosx_10_13_x86_64.whl (32.9 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

Details for the file playwright-1.32.1-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for playwright-1.32.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 32bb5645904b5ba3096a4696c70ce3213eb2310c77273140dc5de14498a84134
MD5 278e77e25fad87409e9b10335b4e1b7d
BLAKE2b-256 92f6e4e64f8787ad8b47357b3d57aab61dea0757311d6397ac403ef2b9a44d71

See more details on using hashes here.

File details

Details for the file playwright-1.32.1-py3-none-win32.whl.

File metadata

  • Download URL: playwright-1.32.1-py3-none-win32.whl
  • Upload date:
  • Size: 29.0 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for playwright-1.32.1-py3-none-win32.whl
Algorithm Hash digest
SHA256 274bfdd413a979346ce66e99c993c105a123e48da591a65638e5cdf518c90172
MD5 fe853329292733ba722df896dfe3412f
BLAKE2b-256 14789404632712b0b2e4c182acee42ee10a6eef7147be8cec4693522300cfe8f

See more details on using hashes here.

File details

Details for the file playwright-1.32.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for playwright-1.32.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d56a743f7d88a313b25a88422779c64e5d5a95baa805b9dfd1c5785aa01d217d
MD5 f78e56fecfe2945013e5ea89db7bffcd
BLAKE2b-256 1cad4cce7baf3b36e73a9c47264b6ab129642e592499056605a1d0a15c253dfa

See more details on using hashes here.

File details

Details for the file playwright-1.32.1-py3-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for playwright-1.32.1-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 83123330e2913a28d11bb8846f7c81a4736553c80f3e9748d213bcaa24fafe91
MD5 d1314eb480e8e49cee9573c66f0cb3de
BLAKE2b-256 d2b6e6c73bc0ac5d3cf62ca2a9e3e9bbee49131411fd4414e867c37cf55512db

See more details on using hashes here.

File details

Details for the file playwright-1.32.1-py3-none-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for playwright-1.32.1-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 42473495f8af0279d868cc541d0c6d3733a8adb117253499dae85203104b0824
MD5 4dd3769981e542010c845141d281a31e
BLAKE2b-256 4bb7705759b492b69c757c662d4ce6c881c6856fa909e317c123bfb356a3c5a0

See more details on using hashes here.

File details

Details for the file playwright-1.32.1-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for playwright-1.32.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5dbf28b8256c2f570a66d6a7c04cd0bfb5225e696e01f85cf5aa49e29ea95b42
MD5 2f7cd5fcd27bbd4d7f5662055a2a2ba4
BLAKE2b-256 6f28a2d138d740c560d62277a8b4c9b3330064ee9484507678c15e0f7d3f77fb

See more details on using hashes here.

File details

Details for the file playwright-1.32.1-py3-none-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for playwright-1.32.1-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 e2f919e8611f598d6e81bd12ab24c5987955b05fc663c98b862034a955387300
MD5 e4c3f677185c8b81f968b7a03a5a27fb
BLAKE2b-256 c82be2f7e616e8c04af1a6922cc40182680239a5d76ec235aa4d063080f6ad72

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page