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 96.0.4641.0
WebKit 15.0
Firefox 92.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.15.3-py3-none-win_amd64.whl (15.0 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.15.3-py3-none-win32.whl (13.4 MB view details)

Uploaded Python 3 Windows x86

playwright-1.15.3-py3-none-macosx_11_0_universal2.whl (18.0 MB view details)

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

playwright-1.15.3-py3-none-macosx_10_13_x86_64.whl (18.0 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: playwright-1.15.3-py3-none-win_amd64.whl
  • Upload date:
  • Size: 15.0 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.15.3-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 3798be30a7d745bfddb210e17a1850389c1ac2442e6b82f0aa776bb9cbc0e8ae
MD5 ae27c02fd514f3c16016e09fdf31d348
BLAKE2b-256 14478906cb7951dc48feb5b5c25acc89741e1dbf16d62f1ab970ed10c7bc60da

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.15.3-py3-none-win32.whl
  • Upload date:
  • Size: 13.4 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.15.3-py3-none-win32.whl
Algorithm Hash digest
SHA256 d977367c22e2e7d605e257b8d5e3547f9b64f7158097168b23df4594afdd5c9a
MD5 59ab46e61047522786fcee39bc93a92a
BLAKE2b-256 15af86977deff993f42eb6500a0fc1ae14ccae51307318faaa6de7355f8b4364

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.15.3-py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 20.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.15.3-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 800511314e8092ebaf10d68d417de221583d0d60e37333b0b1baecd9365080e6
MD5 fcd89444b723540a945c05da8fdee1e8
BLAKE2b-256 dcbd3b2163a4829f335f626f434915158ab7735b299d031c16f509bde37b66e2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.15.3-py3-none-macosx_11_0_universal2.whl
  • Upload date:
  • Size: 18.0 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.15.3-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 36e4033210a6ffcbbf3c6d93445db810df834b24d34393250685ac61b1d917d2
MD5 6439700d7ab8cfa294234f6154eafd23
BLAKE2b-256 ca41cf11af2f21655a237b6999bcb6174d1810acfce1bbc7218d45daf6c387ce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.15.3-py3-none-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 18.0 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.15.3-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 eb0d931b6c61cb69e0c71309ba221bb17e75db8b95f534e421553a757456c5c8
MD5 366974af690557a5b0bba292ba8328cb
BLAKE2b-256 9052d2a897654ee46eff021fd02c3233555ec450251b3a5d89574960df64b0d6

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