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 101.0.4951.15
WebKit 15.4
Firefox 98.0.2

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

Uploaded Python 3 Windows x86-64

playwright-1.21.0-py3-none-win32.whl (27.7 MB view details)

Uploaded Python 3 Windows x86

playwright-1.21.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (33.4 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3

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

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

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

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.21.0-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.21.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: playwright-1.21.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 27.7 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for playwright-1.21.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 0cdd82d4d2ce176b596e960825a4be7b03b7637e9cb243e634e896d787160535
MD5 a83db38a429c501b8cbc5287021d1102
BLAKE2b-256 1387c2f48376438b8ad2d7d0c7699ca862f5d9be94e9c411efd4d5c6ef685ee9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.21.0-py3-none-win32.whl
  • Upload date:
  • Size: 27.7 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for playwright-1.21.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 368d2f9702c79becb34ad5f9b3f94c73ef46265372a1006a78dfd53c562c6248
MD5 dfbd0e417f97071d978d6016f6602e07
BLAKE2b-256 dc8738726ea10726920fbc79a59aae75a188ae54c081b03102297846ec7804b9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.21.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 33.4 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for playwright-1.21.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b0263963c1035ef02d553ec2aa01464956a14b85824c6845ebf5d51fd7b1b9ee
MD5 7c3ac70908f51dbaa994ae6aced3dec9
BLAKE2b-256 0cefd2fb0dcf5718ccb90c7d48e4c11f83c99aba023c9a65914612afe92a3094

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.21.0-py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 33.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for playwright-1.21.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f5cebb2502874b3a1137b48855ea25ebd6dda8c7d8905cb7c948c5627a907167
MD5 1ac656cf85f428496dfcee4f60b9504b
BLAKE2b-256 c2549e7563ac4ff179274bb19c204785cb4daa134bafe1cb41031878928827a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.21.0-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.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for playwright-1.21.0-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 de392a2cb2bddd5a6d075e4020dfadee0fbb6a77c102fd56d8eadeae3e68d127
MD5 2e3fe3dc3ff8d90fb69c3e48d7b02d10
BLAKE2b-256 1fea2702995171f86e56aa786f9056f16e485432ee2e488f576b6c50aae5ad1a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.21.0-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.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for playwright-1.21.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f0faf02c17912f734bc97ca95809f445c01779df94d2a01b4363ea66ff27ecff
MD5 61808655f7954405f71c69b850d70cc0
BLAKE2b-256 3d9f8a1faae9524f67bc0fd50626f21712c2f27f4b2805de0dc1b69a85ccc6aa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.21.0-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.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for playwright-1.21.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 f2d99c802f320db89ff92680c9ac9060203bc64bab880e5097d5c9a8b2cc7d3f
MD5 581fc8e4e341871af007e873d810bd7e
BLAKE2b-256 393d777208e2149d6d3bfdfbae543ebb635d38aaaac3befbf1ff1f08cfe173a4

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