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 108.0.5359.29
WebKit 16.4
Firefox 106.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.28.0-py3-none-win_amd64.whl (27.1 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.28.0-py3-none-win32.whl (27.1 MB view details)

Uploaded Python 3 Windows x86

playwright-1.28.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (32.9 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.28.0-py3-none-manylinux1_x86_64.whl (32.8 MB view details)

Uploaded Python 3

playwright-1.28.0-py3-none-macosx_11_0_universal2.whl (30.6 MB view details)

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

playwright-1.28.0-py3-none-macosx_11_0_arm64.whl (29.1 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.28.0-py3-none-macosx_10_13_x86_64.whl (30.6 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

File hashes

Hashes for playwright-1.28.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 794b9da616c03354a12e48ddf060a9e776ab59b90662b0131ff74ec1b25739f4
MD5 89d4138ecaaf4bb14b72b517491e5559
BLAKE2b-256 a3dc8559bfbd188064c97af56fd2403c87e6f282b44f3ba8b884cae6bcc50ede

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.28.0-py3-none-win32.whl
  • Upload date:
  • Size: 27.1 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for playwright-1.28.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 8557d92718ce45814aff017fa1774ab92089e40b6c16a8073d5a7c4d583d4aed
MD5 e3b6d229681952bc9a2e960922eb6ded
BLAKE2b-256 8a670f3a1aeb99aa56c4862a9aaae0f9ceab8728b5981a365d6aadfddc581d13

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.28.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 074f73c17971f233903949492f31113bfbc2f1e2e85da7c1c03a15e5008b529f
MD5 1a64a0e033f84bbe1d40ebd3754a95b1
BLAKE2b-256 afcc7788f74375cfb981d8fd3c349a4a6fc785b3d856abe33485e53c07c751fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.28.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 96a2d63954098233bbfc48b874f2a8e7cf0c64d7fcae24469571b0fb90ebe00f
MD5 d95b53e1d9f83277c447b1112264a0ba
BLAKE2b-256 28d76bd5eab53c76b356e3ec477abee9c2fd1785056f48042afb6f595a38049a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.28.0-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 a21ddd7b6f6afd434a73471f7cd39673286f0ca88b62b756d90264eb7b5a7daf
MD5 cf1c2446e1314498cb1adabc3a3af4a9
BLAKE2b-256 973528f880594a6e0b89475e21073b83ab374e522ab1fbf86849585ecc4a4e19

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.28.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 265f47aaa42c7986316100f5f468f8654e9a1609c2a2578743e25d058bddc1e6
MD5 83a0d430e5d9a8c66d93b2451fa44929
BLAKE2b-256 a409e458e22170e6b59a57464d5d38dd8d107b08a1c1fc7ca36f965420ebf299

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.28.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 2e101b17e4d5252ef96c9dc8b2ac17f2980dde0420728c1c96a77eeaf6f9b11f
MD5 af35137346aea5fbf81848f804c67835
BLAKE2b-256 19f13b3893a9617313d4d8862e73e8a1df6fd037b601801e1637b6df5ae82e03

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