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.20
WebKit 15.4
Firefox 100.0.2

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

Uploaded Python 3 Windows x86-64

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

Uploaded Python 3 Windows x86

playwright-1.23.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.23.0-py3-none-manylinux1_x86_64.whl (32.3 MB view details)

Uploaded Python 3

playwright-1.23.0-py3-none-macosx_11_0_universal2.whl (30.0 MB view details)

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

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

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.23.0-py3-none-macosx_10_13_x86_64.whl (30.0 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: playwright-1.23.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.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.23.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 8367941ffcebf73b7de5a6e0ac72ed22d59138bbe5a585436b94151fad71a1e5
MD5 32d7bd8f1559e1a9467bc7d06fc6e2b6
BLAKE2b-256 5a5be03f65b9be315051c468b3d1c31a84eee73cae6856c0a559917daa126f2a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.23.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.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.23.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 1be9f0c90a6ceb5064cd675a388ca16a5370c80e276c839c934db6035c8b5b93
MD5 612fcc31325b5be069389a6e5efe2b8f
BLAKE2b-256 85525d51ea7ca8a9dc7b4e7d630519a1214a6da057d8670412313017457c8df9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.23.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.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.23.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 966332a2db4a6d372ba91bac22eb5afded327d92a2d553d874b7f1f672465e7c
MD5 a398b4089796a10df213c25ed3842d19
BLAKE2b-256 8ef32a1c14a037a19db71b89f1a1f8a1d2070676e6758f9926fb6b316f0f1296

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.23.0-py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 32.3 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.9 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.23.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 631c5e32d4667e52e092ed6cb7c930a39b4a9948cac122594ddffd71263141cc
MD5 1040ce4fcaf4a4a4b4735f3758a83883
BLAKE2b-256 ced1b2b63109d5078501fd62e665f07f8077cf296c87c3276a9c297c8142938d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.23.0-py3-none-macosx_11_0_universal2.whl
  • Upload date:
  • Size: 30.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.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.23.0-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 878c89ccc82205e27eac01b012216cadeff14ee44fe26db5d1eb822f9bb51cfa
MD5 bd63d3ff4a7328501b73c2b83ef2cafa
BLAKE2b-256 e2fcff1779be013850ca1f25ef8efe75a21cf744cd1ad50fa10b8d721f32f933

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.23.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.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.23.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9fa3c97f32bc9fe0aad708dee04b6853620bd6025a75a9344c7ab88e025c4735
MD5 754a874318f96f9c6b369fb6fbdc95c9
BLAKE2b-256 a957c98cc188b46b7925e4b50334c1b19c8105313921aa7a44a691662b7ba936

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.23.0-py3-none-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 30.0 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.9 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.23.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 bcfb8f372b629674092c7034422d85208bae37b8069c930824be1bead1b65743
MD5 6d89cf3f7b30057b8d488fb3da43c8e3
BLAKE2b-256 087439f354e9506bfe828f20077a8e9b7e9fd6959881f68d31a8156cdb06f5bf

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