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 111.0.5563.19
WebKit 16.4
Firefox 109.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.31.1-py3-none-win_amd64.whl (28.8 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.31.1-py3-none-win32.whl (28.8 MB view details)

Uploaded Python 3 Windows x86

playwright-1.31.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (34.9 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.31.1-py3-none-manylinux1_x86_64.whl (35.0 MB view details)

Uploaded Python 3

playwright-1.31.1-py3-none-macosx_11_0_universal2.whl (32.7 MB view details)

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

playwright-1.31.1-py3-none-macosx_11_0_arm64.whl (31.0 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.31.1-py3-none-macosx_10_13_x86_64.whl (32.7 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

File hashes

Hashes for playwright-1.31.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 5cb681c1bfc05e49dfe5299b9bf2f51300e60ed077d47c927c8f056938972565
MD5 57d1ed845dd940da81659ad3a6b49089
BLAKE2b-256 d686ba99cc636ba85cb74ac34fa26101a2982b55a688bba213f942a364b97a8e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.31.1-py3-none-win32.whl
  • Upload date:
  • Size: 28.8 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for playwright-1.31.1-py3-none-win32.whl
Algorithm Hash digest
SHA256 5a3eefb7bbe5fb90c89b31ac52a6d78dde94cf82d5fbe0a999789a37d414a92f
MD5 87590d913fd5331238a01b2f1a56e638
BLAKE2b-256 db26215827017f4ad4783088f5538213349b5460dcef49b4038a401fbbf4df4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.31.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f032c87b918a0b348b15065d5a67693cd70f39861ea65b8c9f0b63c991bf1a75
MD5 ba33b29f62d8c2bc60ffd0145ad8ecb2
BLAKE2b-256 20358eafff2e4fc0e78b8c22752ad9b0c0f1001a702a135f8c8eeeb2aafd1c47

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.31.1-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 12c73e6a10ba8a1ddac4849a6f06c753e38de60bec6db5f50f7580ade5772d97
MD5 92edd067ccfbbc9bc58568bb7b8cef5b
BLAKE2b-256 efd88ababfa424f013cb18e70ac0dac97faf689039526345b25aef54d01a2094

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.31.1-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 d74ee6b7de96ddaf3af91a90d6160beda68b281b1027b8afec46945062c25aec
MD5 cca0927344408840a25b9c72777a92f9
BLAKE2b-256 2f81e352f95467d1289d94479061de199ebe0bce5016d20dbe444ebd3a65f235

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.31.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c51029b8837f3533277718ff003a6fc1b512e7879ef4880306c69048345d04ac
MD5 e1fdaeb41225c091dbab4ba7085f8e5c
BLAKE2b-256 004bb076fed23736b43d268054ce8e86fe613d129ca5db957f5e62c12246e7db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.31.1-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 225ff39ff29219caab242a562e6a5efa486d4659ac10d16421ad5904c7f23b25
MD5 817320be43e6c10da5956333105453ef
BLAKE2b-256 600e9385adaf2bff5920e5967d1cc9a2eace6978a005792d163e79439c5205ae

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