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 100.0.4863.0
WebKit 15.4
Firefox 96.0.1

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.19.1-py3-none-win_amd64.whl (27.5 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.19.1-py3-none-win32.whl (27.5 MB view details)

Uploaded Python 3 Windows x86

playwright-1.19.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (33.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.19.1-py3-none-manylinux1_x86_64.whl (33.3 MB view details)

Uploaded Python 3

playwright-1.19.1-py3-none-macosx_11_0_universal2.whl (31.0 MB view details)

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

playwright-1.19.1-py3-none-macosx_11_0_arm64.whl (29.5 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.19.1-py3-none-macosx_10_13_x86_64.whl (31.0 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: playwright-1.19.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 27.5 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for playwright-1.19.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 f1656687532937f35ddfdf0000e8cbe3d621768689daf53659c6d194f220b573
MD5 8e2631e6f89d66752e8bfe764c6d2d7f
BLAKE2b-256 5ec8ba7bf7f59ba88c954a2ff9d87f379aef82b3e56b3c10430cab143f869a6d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.19.1-py3-none-win32.whl
  • Upload date:
  • Size: 27.5 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for playwright-1.19.1-py3-none-win32.whl
Algorithm Hash digest
SHA256 c000a5b2707792a1a688bcb7b774a0835c3f5c0bced4bc2316abd8b730295d59
MD5 6458a40e1bd1d7ea619d4db59a0e51ca
BLAKE2b-256 1a632a0b59bf776807fe59349bdc538432ed6ac8ead9da10d0ba9ad2dc369d77

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.19.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 33.2 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for playwright-1.19.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cf7947ec31ebbee186883f5a27d1af7edd131c939d83ce5870de60e63f288d38
MD5 9372b7aa6821d8d4c1c532c86f118449
BLAKE2b-256 f339d068d05e6acc78abc0ff445eebd1b76cb07a613e71d6bd3206919309dfd4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.19.1-py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 33.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for playwright-1.19.1-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 48e28b10db30d76ec877ed9dab03a09d195eba3f27736a2f5df35fcab0dfc684
MD5 3b7a1fef4cca87a13514a7dd996e36c8
BLAKE2b-256 950f14b63e21b97d847593648a545eaa00cd534d9e5c3fc4d99b0488c9710c87

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.19.1-py3-none-macosx_11_0_universal2.whl
  • Upload date:
  • Size: 31.0 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.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for playwright-1.19.1-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 7a5af0bfd3e9c3cba57337bfe1a6d28c95632091315549c74fb76ae31e75f21b
MD5 1d2699567fdea4e9fc6a383830d385c6
BLAKE2b-256 7a0a377b237bf9be34cbf3feb28c5069c2d70e46bdb7554bf0f722a24c6377b9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.19.1-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 29.5 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for playwright-1.19.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 236a566c39bcf9a72c012da66e56fbb507ba77b46762bf962424b1129dcd8d46
MD5 37af4614d481e2e171cca75d77782d33
BLAKE2b-256 78e908d10c5a510ee4202c4d60c2cd4b41c5876d6d3ad50397f60213d466c56d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.19.1-py3-none-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 31.0 MB
  • Tags: Python 3, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for playwright-1.19.1-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 4226fef2ef089cf9dc1593a3e32fcbe63c307ea2a79797e8cf9444e18a39f6b9
MD5 d13a45233f18ff783a478ab7cabebf5f
BLAKE2b-256 b23e5881177b203f4e94fa05d6eab865f09fb59d682b94c3d903c0e3ae37128c

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