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 104.0.5112.48
WebKit 16.0
Firefox 102.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.24.1-py3-none-win_amd64.whl (27.1 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.24.1-py3-none-win32.whl (27.1 MB view details)

Uploaded Python 3 Windows x86

playwright-1.24.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (32.8 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.24.1-py3-none-macosx_11_0_universal2.whl (30.5 MB view details)

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

playwright-1.24.1-py3-none-macosx_11_0_arm64.whl (29.1 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.24.1-py3-none-macosx_10_13_x86_64.whl (30.5 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: playwright-1.24.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 27.1 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.24.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 7355d00cd2cb24265779b1cd9b18d9dcac17eea4a558d57ce20df650fc766f53
MD5 8bcc8cd498926986e7f1d7b9fa3aed7a
BLAKE2b-256 605793c43bad2b36b083b66a802feb2f49b33182c4bb993205d7212b3aa2da57

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.24.1-py3-none-win32.whl
  • Upload date:
  • Size: 27.1 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.24.1-py3-none-win32.whl
Algorithm Hash digest
SHA256 5ad16b26f4ae2d539c580273bd323907e24a125dbf0f38460466608d1cb39c83
MD5 f3aec739c372d0fc619d4ca42072d885
BLAKE2b-256 6c2c04cd091d16e2383ff287fb9b37a000a7810e7539a78a01fe2575ad611bdf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.24.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 32.8 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.24.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b3f2acda4c22e78c94a47eb5b6f77f20c0313ec76f8e19d77c09bee1c44631d9
MD5 a3eb51d9b347ea629277f7ca0cdeaa33
BLAKE2b-256 eeb9c9ab370d1901d21a0862e1369ff28901fa54a748ef512b40490fac937a0f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.24.1-py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 32.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.24.1-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f6add5cc97a8b3bca775c38ba3382fe73004d59adc9e404bf59f23f35442ede7
MD5 8b1d393aac9a3d74c4dcb1977359ee00
BLAKE2b-256 95c34db8313d2a51c47660584ca04e19f258103e1208ec4847a47f14e8f8d033

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.24.1-py3-none-macosx_11_0_universal2.whl
  • Upload date:
  • Size: 30.5 MB
  • Tags: Python 3, macOS 11.0+ universal2 (ARM64, x86-64)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.24.1-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 e0821859b625ad3dd1c89c9359d5d10d48ce1af81dc99d702437721ab72cd150
MD5 653890ab2d04fe18a65be7c8ecc8570b
BLAKE2b-256 f94fe89d2e59783d8cba2331e984d466e86a89d9e1e02b6d40edb59a2effec63

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.24.1-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 29.1 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.24.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 279c8f150662292814499b61ccbc35917f5041592ede1853e2a46e59456500df
MD5 fb786ae526e76fa3bc36474db3c47b64
BLAKE2b-256 aa82510be942e95ea0dffba0e4638567ae8249e825b581fe470496859b9afbeb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.24.1-py3-none-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 30.5 MB
  • Tags: Python 3, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.24.1-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 04575c6682098a2f5e851a3fb04bc0e3269af6e00732798103a02f63e4409dfb
MD5 82a8fd0c0365e18604111c8596c54c81
BLAKE2b-256 87c5321647b4bd09895e2d9bdc8d60fd064865a78900aa0d8fb6ea0690aa3276

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