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 107.0.5304.18
WebKit 16.0
Firefox 105.0.1

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

Uploaded Python 3 Windows x86-64

playwright-1.27.1-py3-none-win32.whl (27.4 MB view details)

Uploaded Python 3 Windows x86

playwright-1.27.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (33.1 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.27.1-py3-none-manylinux1_x86_64.whl (33.2 MB view details)

Uploaded Python 3

playwright-1.27.1-py3-none-macosx_11_0_universal2.whl (30.9 MB view details)

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

playwright-1.27.1-py3-none-macosx_11_0_arm64.whl (29.4 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.27.1-py3-none-macosx_10_13_x86_64.whl (30.9 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

File hashes

Hashes for playwright-1.27.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 fc8ce323cf116e27902f327cee1cba6fc0c5400e9281df8e53d3355de88336ba
MD5 4c9152ae872842632f3596f148371418
BLAKE2b-256 5da0e7009f47b7fef143617a2907fad14170a5ae765fe7bad8050402addd3cab

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for playwright-1.27.1-py3-none-win32.whl
Algorithm Hash digest
SHA256 464f3a0ea48aeb42adbdada88a91fd36d4311ae7020d2ab58f410c4c92e0ddfe
MD5 2f58b6a81833104f78c7dd3d733fbac7
BLAKE2b-256 7954cc0b824dd92507f4ed48e2a71424af2d0b4f91d72f3932ad4fefa7c68981

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.27.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c32bfbbb6e6529f7f7176551eda7061e9f205e19259052ef663dcae7109c1f12
MD5 bd8a31fdff2f43fcd7706c575b9b4447
BLAKE2b-256 a6c5142449e50253fefff667584793ef303c1bb1ecf1cb849cd8b83cd9a653c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.27.1-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5e7be8dc52b9e3340a08fd15b7d3cdd635efd51c0c62bd1edba55f0bfeea293c
MD5 1989930b72a9357947bea1010dcd5ed4
BLAKE2b-256 1efdeda1d8ff02a36604627a11d83427c959ea7e7be2149772f0174ddc042864

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.27.1-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 db89faac3c535e289f8463b184ffd4523d97b5e959d97bae330d29522c5bfb9d
MD5 04fd9c4f2a2f40ed39ae6096f7f978bd
BLAKE2b-256 c6c2ce67486236581109ea28cd244cf3bebd16f4be8df9d47091e52347c5e737

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.27.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 771d690aaa933bb40f60abbe7935979cfa9a5bec498bbc57cd87baf038348d2b
MD5 f8dbe43f26ef25e2e3783aec499aa76e
BLAKE2b-256 f864f590de098ba4ac63b26e44ecac9e51183149a0ec269d23536ec86aefcf48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.27.1-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 3b584bc23bfacfbfb91777663d2b68891d8a16c5c2228b4702c6a7d29c0ac364
MD5 f071ede47994f19853484e81075717bc
BLAKE2b-256 cd8f1a6d240f7c5fa6d608e153cc73fc2f718ddbaed9788673dd2071b2551ff1

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