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 109.0.5414.46
WebKit 16.4
Firefox 107.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.29.1-py3-none-win_amd64.whl (27.1 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.29.1-py3-none-win32.whl (27.1 MB view details)

Uploaded Python 3 Windows x86

playwright-1.29.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (32.9 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.29.1-py3-none-macosx_11_0_universal2.whl (30.6 MB view details)

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

playwright-1.29.1-py3-none-macosx_11_0_arm64.whl (29.1 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.29.1-py3-none-macosx_10_13_x86_64.whl (30.6 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

File hashes

Hashes for playwright-1.29.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 4cc60189e77db718924c58fbee46af25c77ef5509665999f2ca960225a1f49df
MD5 6692475dcd994d54737cc17659642c94
BLAKE2b-256 c772e3038afba8f63d6e9bc42ef753c3d06af546f2c15b6a88db9efad0560832

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for playwright-1.29.1-py3-none-win32.whl
Algorithm Hash digest
SHA256 83a132b4b074e3b23cb6b93b9527cd36dfd8b37abbfce5b239cbe88822d9939a
MD5 ff192c87fe95762107bc927295db4a24
BLAKE2b-256 e0105abc7cabfadd2c21cc6258cd2baa8b2760ce3e4f565f3dbb7aab78c45cd7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.29.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5f81bf95c5d315a879ccd761d7131e48ec02f5c1c593eb927214fa78801e7236
MD5 40dff5d9e11d571b3e8c16a120d6f0ca
BLAKE2b-256 af4f000edd2212d5bd7edac57a9d7c41e79dd2f9834ee3731cb0a6db8bb8f5f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.29.1-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f6388479558db9b80ec609dfcc06a4bbbecfc62e5b61e3b89142abf26aacfc61
MD5 4f42022305010730a09aaa48536dcfd1
BLAKE2b-256 f55a62691da54ac1e34f71af413007deb399183e3b0ec45690d58c82f942ccb7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.29.1-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 c607282065628761ef6b218879b5aa2eef463c5d763512e4e12b6211acac0408
MD5 0e6aac5f6316f8360c2f53197993f6a9
BLAKE2b-256 76c7fdf78d09cd6659d7c1279802658bb9aabb62c18ae6f60c336c59880d44ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.29.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a5a5223466e552e5d1e09695acfa0f48037222a2ae8d0df5bf0e185205d923e8
MD5 3dbc4e086be9f5c6ccc67f837fdecdd3
BLAKE2b-256 ad86c03dbaa6f4ecb658a9505209586abcbe0036bfe5d81aabf59debafa30815

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.29.1-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 f9c1d16089448933f885ebd5af0878e3f0dab1d3f30d39a6b75c80b388658623
MD5 b48f777822c5d10985196d6afc1c810f
BLAKE2b-256 ced727f438aeea4e5940c4dba523581cf38e5f624fa18263a3a3250bbb31490f

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