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 99.0.4812.0
WebKit 15.4
Firefox 95.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.18.2-py3-none-win_amd64.whl (27.6 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.18.2-py3-none-win32.whl (27.6 MB view details)

Uploaded Python 3 Windows x86

playwright-1.18.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (33.3 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.18.2-py3-none-macosx_11_0_universal2.whl (31.1 MB view details)

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

playwright-1.18.2-py3-none-macosx_11_0_arm64.whl (29.6 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.18.2-py3-none-macosx_10_13_x86_64.whl (31.1 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: playwright-1.18.2-py3-none-win_amd64.whl
  • Upload date:
  • Size: 27.6 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for playwright-1.18.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 4b55758555dd3937ed0722446182f0b97e96704895bea47cf58d04fd7a900edb
MD5 746428dc8ac0063fbdc482cbd66bdcd1
BLAKE2b-256 9455230aa22b7823a0b302b1f6427f020fb778fe0cb85c6fd5d134fdf3cde84b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.18.2-py3-none-win32.whl
  • Upload date:
  • Size: 27.6 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for playwright-1.18.2-py3-none-win32.whl
Algorithm Hash digest
SHA256 51f946c98805eedc965673e873c4d828af298cbe171ef26a256d653e3730632a
MD5 54561fcc760a39593230abdd2c3beab1
BLAKE2b-256 c2a712125175c08aadcf05164b62cf3a8b085d83021425a576f2bdd8a84075ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.18.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6d640e10ce2a41fb474be74526ec1413e71ed242b963a63b4a0ff6f30afabb5d
MD5 fffe2bd489d51c927176d8a469fb6c2d
BLAKE2b-256 39adaedd21f54dbd8c84a8a0c1daddc4518de824ba5327ddb2778a67e731bae0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.18.2-py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 33.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for playwright-1.18.2-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 425c475b65562a6a2f7d46c5dcaa13d8ff098da101a100600016d320325ec436
MD5 b113f22053bbe56a186175c6606f13e9
BLAKE2b-256 07b6f366366f6c9d4d7caaa512acbfe7873c0b60026d60deab200cffab4ddea4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.18.2-py3-none-macosx_11_0_universal2.whl
  • Upload date:
  • Size: 31.1 MB
  • Tags: Python 3, macOS 11.0+ universal2 (ARM64, x86-64)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for playwright-1.18.2-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 0d69764ea9a216ce933eb5679ff6aa6399e7e9e43360809ec261549741e1b8d6
MD5 b24855f4bccb11bafed6c45f9d7a47d1
BLAKE2b-256 171a96c95bbf20ab4d1ec5752a79f546c125bfbc32831164a5b84c98bb97fbe6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.18.2-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 29.6 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for playwright-1.18.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 75aacc73bdfb6c6832e7a09f3e9d356db0e2bd8f18d719b068c17c841c0a5507
MD5 bfcdbcbfcf101ce153d09bf0835a2b12
BLAKE2b-256 6a22bc1b9cc162efb556ff18832fe8fd4212f99b7185f4e25f1ad449862b6515

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.18.2-py3-none-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 31.1 MB
  • Tags: Python 3, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for playwright-1.18.2-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 5b512d0d734a2b6bc001461fdf1cc65e5ef1c8489187d03f6a7c0ed3552fe469
MD5 b1c6a156505044528f58d8a24f2aed5d
BLAKE2b-256 53a6594314d0a80df3ece4ea7b37a10d98d972cb39cf945808cdaa3b12dfe34f

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