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 96.0.4641.0
WebKit 15.0
Firefox 92.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.15.2-py3-none-win_amd64.whl (15.0 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.15.2-py3-none-win32.whl (13.4 MB view details)

Uploaded Python 3 Windows x86

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

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

playwright-1.15.2-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.15.2-py3-none-win_amd64.whl.

File metadata

  • Download URL: playwright-1.15.2-py3-none-win_amd64.whl
  • Upload date:
  • Size: 15.0 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.15.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 d6e30e249085942efe8ad5fd975e4135ef8367aa8a94a0a874d2eb2428225fc4
MD5 71439f4d5b5822efea260e9f6fec79a0
BLAKE2b-256 957a632a128cacd1031dad808e278675acaa39324f3ff6ddf04cc894b5c9c31d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.15.2-py3-none-win32.whl
  • Upload date:
  • Size: 13.4 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.15.2-py3-none-win32.whl
Algorithm Hash digest
SHA256 7e147c1759b4508fef9fd1d05fff0e050f8029d003cef96e8c225404e14403b7
MD5 469aea7f48e562fba01f9a6adb913191
BLAKE2b-256 f2c5745a09acb717d705a9673eb68604e1173abe0babcf717b283849bdc363a2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.15.2-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.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.15.2-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 2ba3c5031025e8e748e603c8e3302142509cea12753de66e86527d619f149892
MD5 8edfe3564e2fac349e48c8399dcb7961
BLAKE2b-256 6b1edf91fed7c165b5c3f1b673d2376e4499a91720e440101a8b15d9d16a4842

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.15.2-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.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.15.2-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 9669a4905c658fdc80b01e07cc13264be8df5ae0b922f1a1a3d0711b86eb8d3d
MD5 f008c5f925c4db9ca88c6135e7e16c89
BLAKE2b-256 7eda940172d1f674339a2f792920bc6ca0f9f890adf726a7bd0eb413ab8ac4d0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.15.2-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.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.15.2-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 40ef29003c70d892481b2bab7e90437d8d9b2f04c2f86b23cda5eef799eb7296
MD5 0b03fae93bd5855f9fa53d4ab5074590
BLAKE2b-256 cf9e4e8fd4482b052f315464c7f62986e6680a9288aa6e291bc4410b3bb19a94

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