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


Release history Release notifications | RSS feed

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

If you're not sure about the file name format, learn more about wheel file names.

playwright-1.15.0-py3-none-win_amd64.whl (15.2 MB view details)

Uploaded Python 3Windows x86-64

playwright-1.15.0-py3-none-win32.whl (13.6 MB view details)

Uploaded Python 3Windows x86

playwright-1.15.0-py3-none-manylinux1_x86_64.whl (20.5 MB view details)

Uploaded Python 3

playwright-1.15.0-py3-none-macosx_11_0_universal2.whl (18.3 MB view details)

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

playwright-1.15.0-py3-none-macosx_10_13_x86_64.whl (18.3 MB view details)

Uploaded Python 3macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: playwright-1.15.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 15.2 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.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 1d8b453ce22c985a1e2d30fa0d13e48311ba9f836615d186e11d466cd0792b3e
MD5 4af08ea75f090da2ec42e06d9e9466a9
BLAKE2b-256 1631590547d01a0b4ef1ddaf32520e9896a5be0e854afd03c94124796cc52e99

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.15.0-py3-none-win32.whl
  • Upload date:
  • Size: 13.6 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.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 324f3344ecc47fea739b34690572477bbd58724b6904af82bb9fcbaf277d56c8
MD5 42b7184a58973589cef48d257d514047
BLAKE2b-256 46814c1e99e73066016140b037add3f948f7e81bf9c8f5a409fafa4ac5226f32

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.15.0-py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 20.5 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.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b2619003000c769fb028f5fd4465f5985c8a0865b8bace935896698843e9b747
MD5 ec33458825ab59c1e663aa6d5ea17837
BLAKE2b-256 db263b2f174f7ec420d3c2c2b6fcd33734fe0e44f2c95a98733e3450f941b78f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.15.0-py3-none-macosx_11_0_universal2.whl
  • Upload date:
  • Size: 18.3 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.0-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 f43966af36d5a757b0503b86447cbc269a5b63944a49de462d70c5df40b6821a
MD5 c9ce16eecb53b303f37dbcaaa62990bc
BLAKE2b-256 3bd293aa9378e9eb59868de5a69340d64f6899380490dc1affebd14537dd316e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.15.0-py3-none-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 18.3 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.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 5eb399aa610ca3fbfb28ad8687da6807ae33dd8446533495318f61728c5098f1
MD5 20818f6d6b5bd26140e71529dd402d93
BLAKE2b-256 59db981f5086069c1d25ed04fa9bd06736fa173ffaf2b02d63e7986c65b7d1d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page