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 94.0.4595.0
WebKit 15.0
Firefox 91.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.14.1-py3-none-win_amd64.whl (14.9 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.14.1-py3-none-win32.whl (13.3 MB view details)

Uploaded Python 3 Windows x86

playwright-1.14.1-py3-none-manylinux1_x86_64.whl (20.2 MB view details)

Uploaded Python 3

playwright-1.14.1-py3-none-macosx_11_0_universal2.whl (18.0 MB view details)

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

playwright-1.14.1-py3-none-macosx_10_13_x86_64.whl (18.0 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: playwright-1.14.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 14.9 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for playwright-1.14.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 1fda94b06c62750915ac30f40fd5244a690a3f569a90f7d1cef92304f5d3dded
MD5 b800f9dc4eb2a0aff8f7bbe3310d7d95
BLAKE2b-256 5a445e7b0c910ca43a74bcdb44a57499fbc19b367b12c068a3ef4a36e7af7802

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.14.1-py3-none-win32.whl
  • Upload date:
  • Size: 13.3 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for playwright-1.14.1-py3-none-win32.whl
Algorithm Hash digest
SHA256 fbf0413b31a016240bca070f9177bb4eb62fd00745f9df1b4f9fc39a0ba03b5b
MD5 5f07c751721daa86e023d1b68d78a026
BLAKE2b-256 0666db2408ca6cfc4b0e9fa79a51bcf6aabf20336cbe19bc81ed34d278a355a7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.14.1-py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 20.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for playwright-1.14.1-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0ed8ae65e8a6cfab285abc500e2e1335c1200836c91316bf49a2bef4e4a40a66
MD5 35aedc307602096b1aecf5cc228b05a1
BLAKE2b-256 78e73e0cb3362c7d90b10457cc9a40fca4bfd9b5dcbe526be3f478d660436916

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.14.1-py3-none-macosx_11_0_universal2.whl
  • Upload date:
  • Size: 18.0 MB
  • Tags: Python 3, macOS 11.0+ universal2 (ARM64, x86-64)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for playwright-1.14.1-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 41f158a850af1e0a2b1a666e42edf56569606ce8bf27a7338dcbbe76f1ef69c2
MD5 8a37d7e8b31ddeb359905397b22dde4e
BLAKE2b-256 d761da5174f950143cce9315731d867f9bba4f51c7c9a0fd06624e36838856f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.14.1-py3-none-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 18.0 MB
  • Tags: Python 3, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for playwright-1.14.1-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 537d72d20bf3a5d9b29d695fa063b2371083a5d1d445a6e497fc65b94691564b
MD5 145bb62d374a13235df2bc357f2502ce
BLAKE2b-256 9585d3dda3bd5ed30418701cdf0e38c4cf486e23bac87fca2aeeafa07d5ee8ac

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