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 114.0.5735.35
WebKit 16.4
Firefox 113.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.34.0-py3-none-win_amd64.whl (29.1 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.34.0-py3-none-win32.whl (29.1 MB view details)

Uploaded Python 3 Windows x86

playwright-1.34.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (35.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.34.0-py3-none-manylinux1_x86_64.whl (35.3 MB view details)

Uploaded Python 3

playwright-1.34.0-py3-none-macosx_11_0_universal2.whl (32.9 MB view details)

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

playwright-1.34.0-py3-none-macosx_11_0_arm64.whl (31.2 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.34.0-py3-none-macosx_10_13_x86_64.whl (32.9 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

File hashes

Hashes for playwright-1.34.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 42e16c930e1e910461f4c551a72fc1b900f37124431bf2b6a6d9ddae70042db4
MD5 53e46a395258d392f62b756c5fe1de70
BLAKE2b-256 233146e16894c8601f025c7b13eb9560c0bdf3ad0f6816d2ffffb3c8164db44b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.34.0-py3-none-win32.whl
  • Upload date:
  • Size: 29.1 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for playwright-1.34.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 c50fef189d87243cc09ae0feb8e417fbe434359ccbcc863fb19ba06d46d31c33
MD5 687d7cbf74017933858d97e48cc90d7f
BLAKE2b-256 d67b5774010d1ffd9461008d213aa454dedb81bba79e353d0a745a55f9b9efff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.34.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bf0cb6aac49d24335fe361868aea72b11f276a95e7809f1a5d1c69b4120c46ac
MD5 fa16d20ebb095816ea1475ef473ed228
BLAKE2b-256 5868ad99fe28efb00204d3ec647a33d9b8841c61955444b05c95ea738cdcdc70

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.34.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a8ba124ea302596a03a66993cd500484fb255cbc10fe0757fa4d49f974267a80
MD5 f59c6fe5f225dd9de4504d615c707610
BLAKE2b-256 92436149e8d0eb904426b7039ae537000d68bf0c306320a657d875a070a14728

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.34.0-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 462251cda0fcbb273497d357dbe14b11e43ebceb0bac9b892beda041ff209aa9
MD5 21db74e006d0e65d295de7ce91ccc67c
BLAKE2b-256 8fa4cccd170413ef8d0c6cb7a6c4939ec437bc278e1eb7761e785b9e2ae25650

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.34.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 402d946631c8458436e099d7731bbf54cf79c9e62e3acae0ea8421e72616926b
MD5 544268821a5729713d1bea2bba5f3a5a
BLAKE2b-256 cf8064d6410ac7d8650c2717ae97c141c98a5473c68df46b496d4cb39ae16fc0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.34.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 69bb9b3296e366a23a99277b4c7673cb54ce71a3f5d630f114f7701b61f98f25
MD5 d8804de74dd318888293e6602b7534b5
BLAKE2b-256 e9e001c8ab950ea8d30718c47c3c4d1ef186bd5668dcd9cdcf301c321b36aab5

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