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

Uploaded Python 3 Windows x86-64

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

Uploaded Python 3 Windows x86

playwright-1.24.0-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.0-py3-none-manylinux1_x86_64.whl (32.9 MB view details)

Uploaded Python 3

playwright-1.24.0-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.0-py3-none-macosx_11_0_arm64.whl (29.1 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.24.0-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.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: playwright-1.24.0-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.10 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.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e4b876c05e773fd4d179cf15942bd7ac33fa7a0884d939485ade15695c70bfd4
MD5 11bca91a2f7f1a77d4c92272f4acde74
BLAKE2b-256 95677ba4b8b5f322a602c2509ad104a6a265568b42884243aa83ba9fbc7b2c06

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.24.0-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.10 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.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 f496bb2ddd36698c85ff9ad3183953d0583afa952b35a1c74096e158b4735651
MD5 ea2cf295edd60b9934644771d319be76
BLAKE2b-256 67afb72d685912fc769f0d2895fa4c2dfdf4e7befe12257c2d065177953cf185

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.24.0-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.10 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.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2060bdf6b3137f45e1cd5e1b7d70081cca82381b09251868aebfc01542e68a2d
MD5 28ddc78b4478e0531e081b3d885c6c4f
BLAKE2b-256 a74cfbb2ea6bf93d6bafa4301050d52ed24aa66548b948e879a6c702fd64d3c3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.24.0-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.10 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.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9caf9680f1791df94d0be2bfc9fcdc793efcb1986564c76f10accac13cc23bd4
MD5 10fb02822b074625d764dd15a15d94e1
BLAKE2b-256 68dc7b8cc4179839c3b3522dc13d6293c5ee3f64ed63f99e9fd5722c5fd75b48

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.24.0-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.10 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.0-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 976e59736502e28efe7bddb77fc9f01d3ccad9bf556c82e4208c194eea8c1eeb
MD5 b0ad3eb7d3f766b0053cb4fd27dfcc4d
BLAKE2b-256 9e5365eadea3d29d1312e5f40606b6891ff026dc65fc977d1f3c32e28c019ad7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.24.0-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.10 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.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fbc74dd91c0c00d282d340b6d08d22010279cbe84052afe0f0854dc1e3a51315
MD5 3315d5f474ac30e3c5d3aae182b7f7cf
BLAKE2b-256 5002b0e5b8756b0b1066239bed7f8a3343a485f401f4aed8937bd824d4edd78f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.24.0-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.10 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.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 942c938a8fc8d5daa01cf4e2ca7dfd4cad9216e3e0af88992c083dd324f9210e
MD5 3d230b69c9b045247e0b0d38958e823d
BLAKE2b-256 aad6cda7fe39638900526f3c5ff14dc6411bb29be4d021187c0c16743228c609

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