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 105.0.5195.19
WebKit 16.0
Firefox 103.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.25.0-py3-none-win_amd64.whl (27.1 MB view details)

Uploaded Python 3 Windows x86-64

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

Uploaded Python 3 Windows x86

playwright-1.25.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (32.8 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.25.0-py3-none-manylinux1_x86_64.whl (32.9 MB view details)

Uploaded Python 3

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

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.25.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.25.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for playwright-1.25.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 eeba268c4b60ef3d9df2e062e0bf7a6fdf76d3855aebcd6fbc9362f09f87cda9
MD5 0cc4344d196b962e3e158fb0f825af92
BLAKE2b-256 93b2df49d4cd596778bfbd5cec78b4ae3102d95fee612cdfdb19f43a8eb2eb5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.25.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.13

File hashes

Hashes for playwright-1.25.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 1ae52b0b11d1494d5bd54800b78afa36b39aadb26e50a370eb63cdb9ff9aa4e4
MD5 318c6f83977755a264328ac8e01f2782
BLAKE2b-256 5adca8d2a007cad111ae18c0d2af389d3b9407987e3270d37c8d35f27602ed48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.25.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cce05f163c28b7e8c5928604f6b5b33fb0468a331a6d1c5cbe606873ce865a87
MD5 ada4a3e266010e486d28d477d316e697
BLAKE2b-256 92735722a024a57670d7bbbe8d530c5630c645f4c69aef9e009fd8a12d57395d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.25.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 630f47755ba8402ab01f4edd85447a91d3fc295aa4d72121f6ecba2ebd8eae3c
MD5 47728f8f016d669edbd2555d2c42f7dd
BLAKE2b-256 4c99aeeae2e71eaec83c5c08108d959c23490d8e28d4f6e2a990415bec2ac795

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.25.0-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 5f676010e0092df882695128858a916ad945f56a1e6081f3a643bea3ebb5cf91
MD5 4813f2030c9a8d902c975c6d4ac86a38
BLAKE2b-256 60b6e2e7d0124b2c1daa56ab657488e734549f245a61c0c347688f06e3033315

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.25.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 44722c85cc9e3971c728b38227cd93122133503f649bbc35e9702789cf46b49d
MD5 a274e8e7d9e9f18c055f3de2c51dd2d5
BLAKE2b-256 3ca344a7ad4b523b6500a71693f8b3f30ea8d84ddd1320a4b6784912422cb4aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.25.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 1ea46d7bd806ed5252ac69c72fc4a4cfef650e0c18643267edde40684de4a4b5
MD5 4913b691909d731b917b9e2f4d0d78e7
BLAKE2b-256 6b6a7305e45d61de1e3fc39d06f9abc5c8a02fa064e1b92826ff8d771255bf72

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