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 101.0.4929.0
WebKit 15.4
Firefox 97.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.20.0-py3-none-win_amd64.whl (27.8 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.20.0-py3-none-win32.whl (27.8 MB view details)

Uploaded Python 3 Windows x86

playwright-1.20.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (33.6 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.20.0-py3-none-manylinux1_x86_64.whl (33.6 MB view details)

Uploaded Python 3

playwright-1.20.0-py3-none-macosx_11_0_universal2.whl (31.3 MB view details)

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

playwright-1.20.0-py3-none-macosx_11_0_arm64.whl (29.8 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.20.0-py3-none-macosx_10_13_x86_64.whl (31.3 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

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

File hashes

Hashes for playwright-1.20.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 84300615ec42ffae3a4950a685f7d3afb0f25f7c7f0c6896213922339ef3acb3
MD5 d4a64f721a743e41a777de324025992e
BLAKE2b-256 f01a27503c0c0cad662d156c7e720274ff79e09d10223decad1b712a42bf4488

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for playwright-1.20.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 fa7f3b4b94ae9d0ea8bab6aec53526e571a493341f5bb0c561c8f1cbe6d14228
MD5 439204f99e8b569c619257d447e6c9a6
BLAKE2b-256 ba201012b1f83ac118b423a7e0939a4d99e94f757866291d0596acdc3abe36bb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.20.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 33.6 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/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for playwright-1.20.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 768a5d176bc244fe94cea8e71573d84b2794b285f1aaffc201ec1a436212516a
MD5 05e7877f9df2a18bf0793278fefdf6b9
BLAKE2b-256 ee30174dcaa6a29a187609844d3ddb14639ef4b9467d18b9723d38a09c3bddf7

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for playwright-1.20.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8240ef3eda53a827aaba1524873a27a95b4316668adfa1b15fec0b2c390a7bf1
MD5 b4b3134904e8dd64cd2ff2454945dcc5
BLAKE2b-256 7f9db48717dbceb83faceb66b8099bfcb00c117f368aaa6d15f80fa0a396bbe0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.20.0-py3-none-macosx_11_0_universal2.whl
  • Upload date:
  • Size: 31.3 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/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for playwright-1.20.0-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 6f5ba082f702865e0bac936ae47d2c002f354c4dcebb09b093997ffe96f0778d
MD5 50ab2bb8cbcb94af0beabe6349e80d44
BLAKE2b-256 9e907d491e152fb16a2226273e7d11c5f612bf1f4b1925afc08ca06ae0dfa70f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.20.0-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 29.8 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/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for playwright-1.20.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 506d9249f474bd7c5346a875effca3f7790fb308516e668ebcaae034200c3a0b
MD5 aba2df61334f4427681b3620481b52da
BLAKE2b-256 e67b9ae0fbc16c53ddb4812426f2e89dd6507f77006543fd6e2ec55412328e5e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.20.0-py3-none-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 31.3 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/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for playwright-1.20.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 444a56049d1de7a770a9d0e9d8ca3846a444e582b46e9ca1db35d6d571926d69
MD5 d9d7a16cb4d8024b53cec4cdf9789c16
BLAKE2b-256 c546c43daa7d6aabd68ff2193772b7a7fb0bf8117fb0d105e97f5c511b2637f1

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