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 113.0.5672.53
WebKit 16.4
Firefox 112.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.33.0-py3-none-win_amd64.whl (29.0 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.33.0-py3-none-win32.whl (29.0 MB view details)

Uploaded Python 3 Windows x86

playwright-1.33.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (35.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.33.0-py3-none-macosx_11_0_universal2.whl (32.9 MB view details)

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

playwright-1.33.0-py3-none-macosx_11_0_arm64.whl (31.2 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.33.0-py3-none-macosx_10_13_x86_64.whl (32.9 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

File hashes

Hashes for playwright-1.33.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 030b273370bcfdec22317ca9fbdd8b66f7493462fb3bf2fce144e3cc82899ae4
MD5 40c079c29787304937e7e1761d67fbb3
BLAKE2b-256 155e97c332457f9c4baeaa14ccdee12b575f4706ef68220e30cc3bead4f5429d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.33.0-py3-none-win32.whl
  • Upload date:
  • Size: 29.0 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.33.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 0671dbb767422621b980b4545eeb2910c73f4e2aabe376a58e4a1ac03990bcec
MD5 fd9f5e79d2fbb3dd3bda32612cd9333e
BLAKE2b-256 7c2adaa07034d783c9d86fcf56baebf3160e9606b18a7c8bf4ed3df0f95c2514

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.33.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9a749f5f2fafc85c5b2a849226cbfdbca4fa047dec3ae20900494e84a390dd0c
MD5 9fbb971baa36294369f5c920e62c16e3
BLAKE2b-256 7835efa5b80e9c862dc7dc0ec97e572b0cfee6390754b4f76ce41f43c53bad54

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.33.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 84dc9ac79ac828d823161fd6903ffbaf9d3843f4ced2fc2e3414b91b15624d0c
MD5 82018a19d08e347fe8f509be6932004a
BLAKE2b-256 31e502de10b87700302a8139ee9e3608fca84c258c4b69db3dedb0fb94062d62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.33.0-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 08a9cd792a65c7e5f2bb68580f669a706d867fecabc8686098a2fabe3e34f5f8
MD5 acd73d337c72c57cb0b363d9865c5534
BLAKE2b-256 ac1251f55c4951f09553ee3e21c269bc5d6a50c015aabc6bf3aad7046c07ff4a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.33.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 69f90c23c3906837bbbce4cb80774df72adc2e35c43b9744e13638d37049d970
MD5 0ec7be961c4cdbee1252afce13a741ea
BLAKE2b-256 8356cbe80ebf739d05317b24e13c15c0eee804e1d6efab364fcada04b409f628

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.33.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 b3f6f27f67ec4ef32216a6fab3ffd8a4e1100383be0e863ff86707e617bec1b6
MD5 f3bd3461766c4d31b586ec69b54e5d6e
BLAKE2b-256 b3a6b197c9f801e6be72613c9be88b3843a92653d944554717466fbbb49b9cd5

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