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 97.0.4666.0
WebKit 15.4
Firefox 93.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.16.1-py3-none-win_amd64.whl (26.1 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.16.1-py3-none-win32.whl (24.5 MB view details)

Uploaded Python 3 Windows x86

playwright-1.16.1-py3-none-manylinux1_x86_64.whl (31.2 MB view details)

Uploaded Python 3

playwright-1.16.1-py3-none-macosx_11_0_universal2.whl (29.3 MB view details)

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

playwright-1.16.1-py3-none-macosx_10_13_x86_64.whl (29.3 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: playwright-1.16.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 26.1 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.16.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 d28b7238398cab11fdaae1f7af68726b72ad384bcee9a3fdd5ae51f2dbcc71bf
MD5 488a289f78b229a3ac41e17184ba8132
BLAKE2b-256 c10d58f8f5ce946327a5122482bc4d6e36adf5bce6d23a62360a1f01ff29fa30

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.16.1-py3-none-win32.whl
  • Upload date:
  • Size: 24.5 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.16.1-py3-none-win32.whl
Algorithm Hash digest
SHA256 a3a658da2d925267542a5c038349aadc33e3e8f66d95f5d2d463c52986320c49
MD5 2dfdc09c6a238cc59aa1974e7cf423da
BLAKE2b-256 1d8ffd06a2d5088136f7e69627cf336498ec2cb6ac632d7a19fb1fb0f259bb64

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.16.1-py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 31.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.16.1-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1d973f2f5c5384fced47f6c1a5920761a7d167e13bc8d55d4092413059b2f503
MD5 923831b5cc12028d980a66e4890527f6
BLAKE2b-256 b816552a99c2b2e310891a466fd8292fce179c373f0ce556bd286c20e5ec7c33

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.16.1-py3-none-macosx_11_0_universal2.whl
  • Upload date:
  • Size: 29.3 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.16.1-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 4f6ca72956222e0b1b175c957eff832dba56206809b2a438600987e117822413
MD5 516f46e36ffb0b1143fd8d5d2c24ab50
BLAKE2b-256 9068517d1f26332e0eb45fa04ab5fa5257106bd912ea5176cc2918efc021537e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.16.1-py3-none-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 29.3 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.16.1-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 6cb65a66d59ed96891cdfb95b2e7a8a49411c8adbbe4a0cb4729433da4321109
MD5 6e01e74276355fd8650b41d7d7d032c9
BLAKE2b-256 54caa34a1c64cb34d45f6a33b18d2093891f9a4effb3dc4002af915902069171

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