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 97.0.4666.0
WebKit 15.4
Firefox 93.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.16.0-py3-none-win_amd64.whl (26.1 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.16.0-py3-none-win32.whl (24.5 MB view details)

Uploaded Python 3 Windows x86

playwright-1.16.0-py3-none-manylinux1_x86_64.whl (31.2 MB view details)

Uploaded Python 3

playwright-1.16.0-py3-none-macosx_11_0_universal2.whl (29.3 MB view details)

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

playwright-1.16.0-py3-none-macosx_10_13_x86_64.whl (29.3 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: playwright-1.16.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 26.1 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for playwright-1.16.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c33b5da8473f3e8f4d504dc679277e2182d615e249e08475d0ce974e480c6101
MD5 b08ccdd51ed74850b0f186cbcb63bb68
BLAKE2b-256 aa7d40fbd3082360dcc73d9d7fe5a021bddd0bfd8563f578fb3b9a854fedf283

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.16.0-py3-none-win32.whl
  • Upload date:
  • Size: 24.5 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for playwright-1.16.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 03cca36476afa62ab2ba1d716161f780575ff6890c7a4cfec6e51cd0f35b5f0f
MD5 c67b5e0789d6d2474d07c96dc9480415
BLAKE2b-256 72c7b513d4e4622064f36c19a99a3e931ac7a4abf6375803004144504c394aad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.16.0-py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 31.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for playwright-1.16.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7cccc8557d0aa6f7970ca37c70d992b645933f1ae1c5e755baaaa93ec2a982ce
MD5 8a74405b1fdc112e11c524df18087330
BLAKE2b-256 0c1b209f28b37cfcc6daf6dec042e1e411618d1b7bb7ba892e1d7c7476aae190

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.16.0-py3-none-macosx_11_0_universal2.whl
  • Upload date:
  • Size: 29.3 MB
  • Tags: Python 3, macOS 11.0+ universal2 (ARM64, x86-64)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for playwright-1.16.0-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 5dbef31bb51e4c6404818232a6afc823f4b2d1122747ca11465249d5f554fa18
MD5 13c44454d3aea406f8ea8415f5e74a29
BLAKE2b-256 3e7c6d7c6a78b3684746ec59f82ecddb72488d0f2672fc676b8c92b36657af07

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.16.0-py3-none-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 29.3 MB
  • Tags: Python 3, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for playwright-1.16.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 b89ad9b7c2364a4e6120b0c37c71a424b6663cd8d244b0acd4155b49fb1723f6
MD5 89e1dd5e8622976c79aa421d3575399a
BLAKE2b-256 a2c8e2f9b9618f48b173ceca0bfb5715b1e7817b32048d4e254ec2051b88d846

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