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.0-py3-none-win_amd64.whl (14.9 MB view details)

Uploaded Python 3 Windows x86-64

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

Uploaded Python 3 Windows x86

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

Uploaded Python 3

playwright-1.14.0-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.0-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.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: playwright-1.14.0-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.0 CPython/3.9.6

File hashes

Hashes for playwright-1.14.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 6dfe60121733420cb8f8e83df6480625ed3830ce5bf3e16ae45f9f6c806d7f0e
MD5 ca559269eee608c3a707066fd9d7bc7b
BLAKE2b-256 dff28377af2f4a3c50bece9c5b86200a0b3cac98f7441bfd4d13f7e3e53e1f3a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.14.0-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.0 CPython/3.9.6

File hashes

Hashes for playwright-1.14.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 205fffc9586947f2b10288baa1a3f125c7adc1b8aa3c7a78138aa37272665f75
MD5 f3d567e4d469f6e121b21c9c9aa86af6
BLAKE2b-256 dd4b04a31307cfd4ae6962965969e7d9796592fd1e1e89ab85c18259ccc5e94e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.14.0-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.0 CPython/3.9.6

File hashes

Hashes for playwright-1.14.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d305d811272c9f0140595cac7bd113d8db3168aeff26555f8886b916c553b4af
MD5 fbaa3a58c93521a55d6c42ea937805fb
BLAKE2b-256 31b1c775341e6cdb743f80ab675a2ef26983e416686276875036eabdfaa0549d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.14.0-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.0 CPython/3.9.6

File hashes

Hashes for playwright-1.14.0-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 f37a7fac1166faf8b3bd9217cce19d9913018174ffaaa52983602803c372e1c6
MD5 2cade2320dbf4be978ad56b5d6243111
BLAKE2b-256 78131e3cdcb38b3312e93984ef26166cba4b1f063255dbb4fe89e33b3f9bf196

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.14.0-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.0 CPython/3.9.6

File hashes

Hashes for playwright-1.14.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 a1aadedd1c12936c3c9032b05700648d8ce0c551f21579b27d172074ab165fb9
MD5 ecd2a500197fd76de9deaa1576b53b93
BLAKE2b-256 d9bf3a9453547c3f09016bae0af57e574eb961b48da608e9ec992e88a087c443

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