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

Uploaded Python 3 Windows x86-64

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

Uploaded Python 3 Windows x86

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

Uploaded Python 3

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

Uploaded Python 3 macOS 11.0+ ARM64

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

File metadata

File hashes

Hashes for playwright-1.25.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 d5c64d4b6f4ab56ea0acf5446f3aa3834beea8d871c58a49eff189aa3cf85d13
MD5 75418ac596b1494549ba7838f28d2008
BLAKE2b-256 a67f2caef7abd1eb9ccdd77c35ac056e171ae20fda34b29a032cb0433f205fc8

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for playwright-1.25.1-py3-none-win32.whl
Algorithm Hash digest
SHA256 ca66ec55858fddfb0255a35c4c320795178b69424a51f95fe09530fed71e9abf
MD5 220483d55cacd6ee83aba2f4f26f6d39
BLAKE2b-256 ee0f7104b4c1ab50090e5f40d149e52d51d6087f4792442866aad656e30c0c4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.25.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 de9cd487b28e7d03eb04ab8f8e23bfa75c18dffc897396dffa8e9f1be0982d22
MD5 168007b4db2bbce5686076fb04ee9295
BLAKE2b-256 17a2e507ad4cfecd14bced817d08e648cbf62a8a7f333efd08ecc09b66d6fc9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.25.1-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 25b7ca2ee2bdf668dc487563355f42fc354bf5a386eaf639ace44133af7c7ab3
MD5 2bdb2f0a37c78a7b0d8c57ef1cc42eb0
BLAKE2b-256 84a5d706fbfe2b984d94c4cc3388f0134659dd3729f2fdee0eae2899d6a021ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.25.1-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 426f2e839671b6fe803a87ce3c7b38a8b3c552565863700791238a97f5f1ad24
MD5 d0ccd647265c4f2d5e1557045f5c52fe
BLAKE2b-256 f391b423e7b93e85000c8ed935abc4a8ac133a9bef8ff4c1616d75244c387c2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.25.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 58641991bcf43ade2a0740ece6e9d22deff228a6358f9aa61a290b7c4ab6f6ab
MD5 e438815f6aae214ed1409a417d1482ce
BLAKE2b-256 785df5738fc3016eee711527a04ee6b63f7b7173f0c510f9cea01e4b4b85ee09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.25.1-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 1dbe89f4e3dae53add2c6b642cd07c44474eaba88593e29be7ae82106ede8e63
MD5 d3087856a6d5aacd42474e1605ff6381
BLAKE2b-256 27e252aa6dc9230bf1d8d5620bd10e95c4e0967af0d818c025beeed8079e6426

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