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 104.0.5112.20
WebKit 15.4
Firefox 100.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.23.1-py3-none-win_amd64.whl (26.5 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.23.1-py3-none-win32.whl (26.5 MB view details)

Uploaded Python 3 Windows x86

playwright-1.23.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (32.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.23.1-py3-none-manylinux1_x86_64.whl (32.3 MB view details)

Uploaded Python 3

playwright-1.23.1-py3-none-macosx_11_0_universal2.whl (30.0 MB view details)

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

playwright-1.23.1-py3-none-macosx_11_0_arm64.whl (28.5 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.23.1-py3-none-macosx_10_13_x86_64.whl (30.0 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: playwright-1.23.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 26.5 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.23.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 72f2e21effda5f3f8a0a23988bc4b49b78ca6a78303159e6ee4aa514c2451ca0
MD5 2dfd3f3cf70bd81eea353bcf36244cbd
BLAKE2b-256 ee5e9fc6efe73bf38d4ff3dee620e0ed1ae414a9533eba0751526a46d314acb7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.23.1-py3-none-win32.whl
  • Upload date:
  • Size: 26.5 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.23.1-py3-none-win32.whl
Algorithm Hash digest
SHA256 f337c8fc4be9b5ebd63297ae235aae4b8e0cb694adfbef88478fc78712afca09
MD5 b159621ef12ffe3728d382ba0220f99f
BLAKE2b-256 086b1ac671c39eef6d5e3fd707eba0203cd584764bfcbbd1f42ee2b5d89918b7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.23.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 32.2 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.23.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b8573ab3aa669c951421dd4cfc4c99f3f6c3f3a2a0318c6b91c45c0f5fa2f7c3
MD5 a727fd54c2cfb84a88f65e5277293187
BLAKE2b-256 7ba13ff63949d7b6472226cae48dc3347d62904082dc5fe3da411f57c6765e1d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.23.1-py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 32.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.23.1-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c928a6c2af723f7196dc0c243d857ac96b0951360166cc5cb114ae76c42c359e
MD5 0e6618d532c04611f3b94a4abd8f458d
BLAKE2b-256 7c71cd6c6ae0358b82d5ea9b4dc8c67348ea374ecd510135c8b6ab9de4e18801

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.23.1-py3-none-macosx_11_0_universal2.whl
  • Upload date:
  • Size: 30.0 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.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.23.1-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 34ec1c952e0dfe203e45e52109f490b6bd90ccecdfaa389dc551ed580c7d94b4
MD5 faa28677f35e0a59e1c5db5066365bc3
BLAKE2b-256 97727c452c6349599cd30048c75edc5b972ed7c4ec05f3a9ed30917b9d5e6e4a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.23.1-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 28.5 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.23.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4559648db378752072965bce139993720212328fe1a009474e3136df381216a3
MD5 3211ae293ade71c2501e81a2ea0a4f42
BLAKE2b-256 595f9e0b82142c15adb0f6faf3f432e49f043933a6b269f76ff67a13b3360985

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.23.1-py3-none-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 30.0 MB
  • Tags: Python 3, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for playwright-1.23.1-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 438c15c20930cbdb0a8d1d8d6e37f2d8f35e810303f10ac18f12fca0b15c2e11
MD5 314401e870bcbdc71406afde0c1fe81d
BLAKE2b-256 5ee78328a607e498bab03641b9c4fc8b362b33c1e4475908f4234d9b59a2b730

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