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 99.0.4812.0
WebKit 15.4
Firefox 95.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.18.1-py3-none-win_amd64.whl (27.6 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.18.1-py3-none-win32.whl (27.6 MB view details)

Uploaded Python 3 Windows x86

playwright-1.18.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (33.3 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.18.1-py3-none-manylinux1_x86_64.whl (33.4 MB view details)

Uploaded Python 3

playwright-1.18.1-py3-none-macosx_11_0_universal2.whl (31.1 MB view details)

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

playwright-1.18.1-py3-none-macosx_11_0_arm64.whl (29.6 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.18.1-py3-none-macosx_10_13_x86_64.whl (31.1 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: playwright-1.18.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 27.6 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for playwright-1.18.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 84572ba1d04cb3e31e30181fa4fa09ca64d7841af19e98ff221259e2d6a108e6
MD5 70df1345240b05620c4ba52e651f8eeb
BLAKE2b-256 e2cb6393337daba2b38f89ac06c035f357dba5a327dc60b4d1626c19afa5fead

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.18.1-py3-none-win32.whl
  • Upload date:
  • Size: 27.6 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for playwright-1.18.1-py3-none-win32.whl
Algorithm Hash digest
SHA256 917b8472cab589cece536ae97491b4f124b324642190985440737d1fe8a55764
MD5 4762b6d3d500402716ed8c2a6c06ffec
BLAKE2b-256 fbf55e75fa3ed27f53f7952228520d7ef1463a61ef89cdabab145eca3e8f2cd7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.18.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7ae5f8e6ae820d44b6fe04f94c261047536ee75724a032f2dd2be94c952303ed
MD5 f5ead4b4336acd89cb69d1a5dcd0761f
BLAKE2b-256 3df0f435f9d81bf103682ee8dd34c1093a73c760138126888b1871a588d83798

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.18.1-py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 33.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for playwright-1.18.1-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d8a8d944da91f77c0a66d23e51bf8aa142a38820da8e70cf13b68636ee343346
MD5 619ad8e5aad01ec9dab15d5c6a3fe478
BLAKE2b-256 6d81e58b7c6bcf4be8a9e1589a71986192223c9cd8c0087914b8c52089513240

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.18.1-py3-none-macosx_11_0_universal2.whl
  • Upload date:
  • Size: 31.1 MB
  • Tags: Python 3, macOS 11.0+ universal2 (ARM64, x86-64)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for playwright-1.18.1-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 a5ce9c42e6108b5aeb63fdfefe2adbb9d0d85c1cba389bf7da0c56d1a6aa874e
MD5 dec04ba289cedc09eedb2a5513435e7f
BLAKE2b-256 cf8ecee6dc14e37b5ea849642705cc1ab8c345d62c591b150b126dc23157ce71

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.18.1-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 29.6 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for playwright-1.18.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 528470e89827b09524acb197634381f62483c15b78dcbedc85528e0b727e705f
MD5 5736e3418f71283f2587fcfa188f0fc4
BLAKE2b-256 21158825e04a48ce2ad11e55b3f003a3f185bb293c0869b82e908df4e64a203e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.18.1-py3-none-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 31.1 MB
  • Tags: Python 3, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for playwright-1.18.1-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 e47ebe9d55a3d8e320b63aa688b671d9e40e50c906315cb225f20ffe7503b35d
MD5 e3743024abf424ddf6754e6dfb371c5b
BLAKE2b-256 632fc741f8d7ad3b8c1c2dfa072945fcd38d5c7a299f40f7cef4d1be8d689fb8

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