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 106.0.5249.30
WebKit 16.0
Firefox 104.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.26.1-py3-none-win_amd64.whl (27.3 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.26.1-py3-none-win32.whl (27.3 MB view details)

Uploaded Python 3 Windows x86

playwright-1.26.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (33.0 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.26.1-py3-none-manylinux1_x86_64.whl (33.1 MB view details)

Uploaded Python 3

playwright-1.26.1-py3-none-macosx_11_0_universal2.whl (30.8 MB view details)

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

playwright-1.26.1-py3-none-macosx_11_0_arm64.whl (29.4 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.26.1-py3-none-macosx_10_13_x86_64.whl (30.8 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

File hashes

Hashes for playwright-1.26.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 9dfbb664a0d3865ec3db4cd636dab755c7bf5eeadcaf1d6abe9ab8c9c26c431f
MD5 297ab2e1569419be1e6c7fc229c2af9d
BLAKE2b-256 10a5d9fb22e50d0692ba12114fd421fb66784980950f793c6d532285859b74e6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for playwright-1.26.1-py3-none-win32.whl
Algorithm Hash digest
SHA256 1b06a0cd1d0c4ded1c5412129f9207d2589aa5ac86645cfa1a89690ef610228b
MD5 a36bfa9d9723638191f43c36d933b30b
BLAKE2b-256 4291ab9ac504db4bde9e1a0b4cb5b180a957acf555704f1a83c8b46c4a129c46

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.26.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e8b3a58cd903d21bf71b0361b8f1379bb9de8046ecf5a866f5d13bd815100099
MD5 236024835e76d42b25f3444154f2da4c
BLAKE2b-256 2f945ad6b3cb8cac86752a4cf0ce9b737127e8dff91a8a0f1805c80e3e772baa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.26.1-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c3cc87fc738d7c7668d8e3a8086fca2c6f981d31e560cee5f89415d17160f7e5
MD5 c3447c5bb70d58df15c6f6354ac22149
BLAKE2b-256 6c44eebc833531f825b522554795c9273334fa272b31fe180e9414338469496e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.26.1-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 a04bb9f2b25ad00077c7816e51b2cc3edc9b5ae7ed864ab1efbc3037a16db868
MD5 9af4f0e11c2ea3370794bac80186b90e
BLAKE2b-256 eed174f7826f2fb9c8c8a5de2874147e6cd9aa9c968f1c0ae2246edf0b8fe6e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.26.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ecd2d47a671d40f2c9f2fa70dec5c4e8f341194e7450e1483c787e02eecb6f61
MD5 7980514d7aab108a0f8a75d19008c799
BLAKE2b-256 13c856c0fc4c65dbbe5fdf4c76f1022a59ba2b357796755f8c3e6e7a2a4b1867

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.26.1-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 eabf81e932076be5afe8f198c13cde913db319ccb07a9c16ea13bd0d372b40b2
MD5 a4eee56f92f561aff54fca5b61a65165
BLAKE2b-256 a0c868108ddfe2a66819dd800f2c2b1c39e8ce2d8f93470792ab4c15d9d4a654

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