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 112.0.5615.29
WebKit 16.4
Firefox 111.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.32.0-py3-none-win_amd64.whl (29.0 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.32.0-py3-none-win32.whl (29.0 MB view details)

Uploaded Python 3 Windows x86

playwright-1.32.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (35.1 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.32.0-py3-none-manylinux1_x86_64.whl (35.2 MB view details)

Uploaded Python 3

playwright-1.32.0-py3-none-macosx_11_0_universal2.whl (32.9 MB view details)

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

playwright-1.32.0-py3-none-macosx_11_0_arm64.whl (31.2 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.32.0-py3-none-macosx_10_13_x86_64.whl (32.9 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

File hashes

Hashes for playwright-1.32.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 138f1671e0033218e2d83bcd1a89000ee913fb84adff4f3606cfeb86529db0c8
MD5 1fe533970a75ec9ce1c935f22aa344f3
BLAKE2b-256 1a907abc358715136dd502bfb14e116a7e3cdf01f45235a53c5f0b6427ca0970

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.32.0-py3-none-win32.whl
  • Upload date:
  • Size: 29.0 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for playwright-1.32.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 ad58e165b6cb0125f9176637176a1b46db7c8360a6058ae44ca1c5ff24740c26
MD5 8b7805f324ed4972f410942f3daa56a7
BLAKE2b-256 66b767bbbdcc70b1cb3ba848ca270327812fd07579efef148fe66358387e94c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.32.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ef7dcf45b7011105e33055e8cb3aa9bbaa50a861e8cc2d997f132379b721fe29
MD5 9be8581387d058c4f5d2145ea553f8ba
BLAKE2b-256 13a4a619d189c48aaf52829769c2d02ea2e1680c666a1be7b4c1a3ab70bcf59d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.32.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0c824f29d7406860c6c6773c512018c9ec2114d0baef20968e994e9cb3498dfa
MD5 0bf92fd588f89e3682b45606f8f52792
BLAKE2b-256 c87db8c0d1e6e446704522773be63f1807af22390a796c9cc7b06e20d366907d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.32.0-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 0d92de3ee2652de48ba05737493687dc07bd721415afb528b5fa909950291e67
MD5 52c08c95f1f6624ecf230ea4ae42be11
BLAKE2b-256 6d374acc780608816bdbae650b71de316a7cf26f4cd451e5bd1b931303eef620

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.32.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b94b014442989dd707b7c4f4c8cc92462d087282a48b121055343a3229f1333f
MD5 d39ca33134f7af50536eeed0d4fa497a
BLAKE2b-256 1b082fe957fad6b79291ff82e2e1748683a257f7ba3854c13a7ff0ea6e765d68

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.32.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 1cccf2185452cdd7eb4c130fad15ed403fb246d3f6560c6c0ff65953e6b204e7
MD5 e459c253b777b42c1ae5c44b92cce43c
BLAKE2b-256 02d180a8a7cd2360b86b74183084c98fc36eab9aada4a75d97be52815f876741

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