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.0-py3-none-win_amd64.whl (27.1 MB view details)

Uploaded Python 3 Windows x86-64

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

Uploaded Python 3 Windows x86

playwright-1.29.0-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.0-py3-none-manylinux1_x86_64.whl (32.9 MB view details)

Uploaded Python 3

playwright-1.29.0-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.0-py3-none-macosx_11_0_arm64.whl (29.1 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.29.0-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.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for playwright-1.29.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 8a283d52d1d10a636ba7ce4f90d0d6fd611ee45c8c8f3eaae03b27596439c7fd
MD5 d9a3c7febfdbb5a6a3f05613df8f7b47
BLAKE2b-256 92364c8b6159f34105a2c85d1cbb6d7a3d476bdc2cc0118fadb9486f24d11efa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.29.0-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.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 9203d2977ec9e6716ff5611eb786e838c15742cca1dea4cc1d85de3e699ad25a
MD5 4059ffcb5c02aeb1c82c12b03c8ec0f5
BLAKE2b-256 0de2baa37333b4e2d579b0cb27d84ba06bd533709e2d178377f3997ee72e3bda

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.29.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2ef51608b56fe7699b7e1e3b7e8484d3677e2bc9054afc78d28489e060300e2b
MD5 07fa66dd2ae5e899d060d4354bebf416
BLAKE2b-256 69ada074f2fd1361d944270c01e82aa56ad29d127affe59d2efd8ef7bdd8cfdf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.29.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f9849cb83041a8bff69c7899ab1aef8066e3eb422b437c9c7a3772c22f432323
MD5 2432985b14e534b7ac9ec4658ddeef16
BLAKE2b-256 74bbfda85ff7d5d7407d741289ac5fc77b3319b9d4b0aa33fbaec10ddea05703

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.29.0-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 84ae9f999d57463d6450fd4fb3e9e70695fb2b87c4ca76f4459f054ab6fa6583
MD5 5b612f868246d75f639b4d4dd4f1a05e
BLAKE2b-256 94e055d941f524612cf1923368163ffa786be5f1a0f90d89b02f7fa35e3af3b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.29.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b8c2317789ae2cbca1e345f421dfa6082dac0910a4d0f57f345a395cb9e57197
MD5 04a706e157d17164af42d147ca3c2c0e
BLAKE2b-256 3dfc2be2b78eab60f40406719934eee6e51f13a8cde05a0bc8940689c79ea475

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.29.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 c7a4fc12f15fb24fdb810503a6e08db81d38805f739b252645c3eede357e9918
MD5 0848190044b0a68b94ce5cbebb4106d3
BLAKE2b-256 45f70fa67dbb8db2e176af0028c66915ff0e5dfa3d7113cb0ae93a6a7496d070

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