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.4929.0
WebKit 15.4
Firefox 97.0.1

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

Uploaded Python 3 Windows x86-64

playwright-1.20.1-py3-none-win32.whl (27.9 MB view details)

Uploaded Python 3 Windows x86

playwright-1.20.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (33.6 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.20.1-py3-none-manylinux1_x86_64.whl (33.6 MB view details)

Uploaded Python 3

playwright-1.20.1-py3-none-macosx_11_0_universal2.whl (31.3 MB view details)

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

playwright-1.20.1-py3-none-macosx_11_0_arm64.whl (29.8 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.20.1-py3-none-macosx_10_13_x86_64.whl (31.3 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: playwright-1.20.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 27.9 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.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for playwright-1.20.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 fac22d79d9f3af9a0fdededaae5a95c652ac98ffc7f4afb042c7a6b0f854337e
MD5 0a180a10115b84ae17212f88901b5297
BLAKE2b-256 29163f10a701593a20f4ee93d594ad0fb63b31254b73593c6a4588ff776043b2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.20.1-py3-none-win32.whl
  • Upload date:
  • Size: 27.9 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.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for playwright-1.20.1-py3-none-win32.whl
Algorithm Hash digest
SHA256 4d093488729768b3bf288b5959eb2ad6d5603be5e39a59be1d014e7b2703e90a
MD5 8ab26f7665d05def901549d81156f1ca
BLAKE2b-256 285cbcc32e6f7561110bc1a8921f83308f9b211be640e09dca3c23f3469cc977

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.20.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 33.6 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.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for playwright-1.20.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a5ba030f5382a5fa2901173fed5e821fc2c8452810b123c2bf0dfa43251544a8
MD5 d0058f4ec0363810e2a2ead92d30f4a4
BLAKE2b-256 476851c2b2ebf830665b8626406e29b2e7ffe19daf2a4f46a6d3f0771246616e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.20.1-py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 33.6 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.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for playwright-1.20.1-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0af0632e201fb4327ea7bfc5bf12ad18afd3468b1ee76ca163145bc96ea42be7
MD5 b531dc202d9effedba8b08641764049a
BLAKE2b-256 02098deafa4661717277f958d589add07eef446c0011a394f40249503a7ce0cb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.20.1-py3-none-macosx_11_0_universal2.whl
  • Upload date:
  • Size: 31.3 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.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for playwright-1.20.1-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 220a84b0f35639a9d017d3e82df2e5590b4ad89c93b9d74dbfa90d0d690516fe
MD5 e6d0042b0c38d6d620ba5bf9974e492a
BLAKE2b-256 a98a51ecf2c71987467e66abc849c25ae9593da5b42eaf92edd18025fd1eb406

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.20.1-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 29.8 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.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for playwright-1.20.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5c2735cba76ef992ea5129eead9da315e45f2a40858fb43dabd1b80fb0fa6749
MD5 af4680318dd1437be235a81ff925ac39
BLAKE2b-256 e2aa47fa3de5dc614c50b3d2757c77bb1a78476fbe676f2bfdcf5adcb76a7c47

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.20.1-py3-none-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 31.3 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.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for playwright-1.20.1-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 7c9422d7d654123cb988fadde0cd46a2eeaaa7e1ce6ac6587aabb0a27b52e17c
MD5 c7dbddcaa04170fb26f0b314aa94b8d0
BLAKE2b-256 7a5793c86ed0071f9d090e471c20f3eb785a25acd54b8e91fd7cabfb818f9862

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