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 102.0.5005.40
WebKit 15.4
Firefox 99.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.22.0-py3-none-win_amd64.whl (26.5 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.22.0-py3-none-win32.whl (26.5 MB view details)

Uploaded Python 3 Windows x86

playwright-1.22.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (32.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.22.0-py3-none-manylinux1_x86_64.whl (32.2 MB view details)

Uploaded Python 3

playwright-1.22.0-py3-none-macosx_11_0_universal2.whl (29.9 MB view details)

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

playwright-1.22.0-py3-none-macosx_11_0_arm64.whl (28.5 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.22.0-py3-none-macosx_10_13_x86_64.whl (29.9 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: playwright-1.22.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 26.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/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for playwright-1.22.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 bc7827fcc037a9a6f571328c524d50bfd46db4ebdc415ab8b8efafae30c1d597
MD5 5ef6c58c1b2db24f5881d1089da35e67
BLAKE2b-256 37653a2ac7245999a607a0bd14d356659a8b14f0a250c54d8efab55cc0ed4f46

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.22.0-py3-none-win32.whl
  • Upload date:
  • Size: 26.5 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for playwright-1.22.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 a4977211414532a525a057f8d461a7277fdfefa20eb577b2e0247523815ba521
MD5 908c128a3b32610d8ea2be9af545e20b
BLAKE2b-256 bb397aeb7f87444a864258e27ba320ef81221a9878e8ed969a75654e5fd4255f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.22.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 32.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/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for playwright-1.22.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 217b2f623527ded15d602ccca5138395a1677c67399c4494844d5341420d34e0
MD5 9c2dcfaf44bbec1780e3d9478bb5e69a
BLAKE2b-256 ebde98e6e5e17e6f4c4ab7d1244e0ad1f6e1b397d899c3e04d924245110f5a3b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.22.0-py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 32.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for playwright-1.22.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 78ddf51d0c08d94edb6d2ddf7b262f0d87a1c0ab5e121bfefa1945214c308f95
MD5 56ec6cdb9287087b70d5031e195b89ab
BLAKE2b-256 8d47c6f91933d6e6e0cfbc8ae58e8f204cd976fa6534d27dfd8a9793705fe3aa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.22.0-py3-none-macosx_11_0_universal2.whl
  • Upload date:
  • Size: 29.9 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/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for playwright-1.22.0-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 a36dfaf9be0228985b7b001887f66dc61e8300970c0602ae9d5b191da510a982
MD5 399aec778dad839bfef5b09960c8b5ac
BLAKE2b-256 2d33348f3c53353b729e242855ae25ab1400e18c575485c567ba55c496350783

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.22.0-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 28.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/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for playwright-1.22.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cd2e87b4d2a3d736bbd4a85ed7638c577dfc8098bcabd92d248440d51beac50b
MD5 af225e2fdab542f773eeb1a51669c4e6
BLAKE2b-256 28518ba4dcdeaec59ede9de4ffbcb46816ecea4547139d46b059b58612b1e6c2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.22.0-py3-none-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 29.9 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/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for playwright-1.22.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 9506d582e1a36aa19b06f5b5f8ae154265ec2fc5039217cfe8dfd66edb1a7563
MD5 187d650e7eb47e377c36ad1d82e97da8
BLAKE2b-256 d15006849903b927eb12f07ec4efc0026bc1fa5c13a0eb3c06bfc1259f685d3c

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