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 99.0.4812.0
WebKit 15.4
Firefox 95.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.18.0-py3-none-win_amd64.whl (27.6 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.18.0-py3-none-win32.whl (27.6 MB view details)

Uploaded Python 3 Windows x86

playwright-1.18.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (33.3 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3

playwright-1.18.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.18.0-py3-none-macosx_11_0_arm64.whl (29.6 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.18.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.18.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: playwright-1.18.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 27.6 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for playwright-1.18.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 703c181e54d57c38142938f79c29b167dd5a8eb5ea38a3a62488651f286835a5
MD5 a2f3ad4a65b7058543813937feb613f1
BLAKE2b-256 4b6940b2ef97aa63f1b2027f6976b37354831390c4ce24640960497bae579612

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.18.0-py3-none-win32.whl
  • Upload date:
  • Size: 27.6 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for playwright-1.18.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 09dada24e27af4dfa61d05b47f376e812b9a854bd246f745eede6cd973ff86bc
MD5 ac9ff8bda1dac0903d198bbee78c9a90
BLAKE2b-256 561045cfb30e801d665d8cc8cdad73950f75ec18a63769e62125b9ab15e933ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.18.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6d637d1579b3e60bd34f9875cf7e0a28c62674e2386151d8aaf29db3ab0c0e27
MD5 03f5dc669a0ab87b9c20951c824459e0
BLAKE2b-256 50ce90e8cb0c9041729e93d7d729f1c335ac837a8ba01a45861acc6c5233351c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.18.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.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for playwright-1.18.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4030a266dfa614037a6874f9b9fe2387615e7b13994012e0bb9d81bb79acb5c7
MD5 dd341c815f52426381c91c1ca9918fc3
BLAKE2b-256 64ad623e11bbfe1ca3044e9db70d7372422c43c6d393f5f3a7560af6f780d488

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.18.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.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for playwright-1.18.0-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 54df802e1779963d660d857271772a155e783fbd027085a5e5b9a83e40b4ae3d
MD5 d4b2143e90342e655dc90ecc31f6c9c1
BLAKE2b-256 77e92b97b5ce10bb0571b71d1192a2da827310333e0c3fbcb6f8a84ee70abb60

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.18.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.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for playwright-1.18.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 023d18418c4cc4bfd26596e4e9b46f2755e28508e47ae6c6f302b81ee45614d5
MD5 517f960bdb1307cf477ab47d4d57d677
BLAKE2b-256 36d79f2f42dffeee3e3ff963c886023b949c6da1814daeec6d48bfd7874b525a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.18.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.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for playwright-1.18.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 569019b0310185fa0cc8b8c364f9b14a2360b327586905d8671099febc9460cb
MD5 1497daa6ce83a8a03e2caa436c39ef85
BLAKE2b-256 e79b5804cc2e029f79906901d374069e45e66a160da2793258b581250062543f

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