Skip to main content

this_file: README.md

PlaywrightAuthor

PlaywrightAuthor gives Python Playwright scripts a persistent, authenticated Chrome for Testing browser.

It finds or installs Chrome for Testing, launches it with a persistent user profile and Chrome DevTools Protocol port, and returns a normal Playwright Browser. You log in once in the visible browser; later scripts reuse the same cookies and local browser state.

from playwrightauthor import Browser

with Browser(profile="google-primary", service="Gemini") as browser:
    page = browser.get_page()
    page.goto("https://gemini.google.com/")
    print(page.title())

Install

uv add playwrightauthor
npx @puppeteer/browsers install chrome@stable

The package uses Chrome for Testing, not a normal Chrome user profile. Multiple profiles can run at the same time because each profile receives a stable CDP debug port.

First sign-in (once per profile)

playwrightauthor run --profile google-primary --service Gemini

A visible Chrome window opens. Sign in. The session is saved to the profile directory and reused on every subsequent script run.

CLI

playwrightauthor run --profile google-primary --service Gemini
playwrightauthor run --profile google-secondary --service NotebookLM
playwrightauthor status --profile google-primary
playwrightauthor profile list
playwrightauthor profile show --name google-primary

When a browser opens for sign-in, consent, captcha, or another manual step, PlaywrightAuthor shows a small dialognano prompt describing the service, profile, and task. Suppress it from Python with suppress_dialog=True or from the CLI with --suppress-dialog.

Python API

from playwrightauthor import Browser, AsyncBrowser

with Browser(profile="work", suppress_dialog=True) as browser:
    page = browser.get_page()
    page.goto("https://github.com/")

Browser and AsyncBrowser accept profile, service, task, verbose, and suppress_dialog.

Documentation

Practical setup, CLI, profile, API, architecture, and troubleshooting guides live in docs/.

Local docs preview:

cd docs
bundle install
bundle exec jekyll serve

Development

uv run ruff check --fix src tests
uv run ruff format src tests
uvx hatch test          # runs offline in < 1 s, no Chrome needed

Run only the slow browser-integration tests (requires Chrome):

uv run pytest -m slow

Metadata

Release files for playwrightauthor 1.0.24

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for playwrightauthor 1.0.24
File Size Uploaded Provenance Actions
playwrightauthor-1.0.24.tar.gz 1.3 MB Without provenance Details for playwrightauthor-1.0.24.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for playwrightauthor 1.0.24
File Interpreter ABI Platform Actions
playwrightauthor-1.0.24-py3-none-any.whl Python 3 none any Details for playwrightauthor-1.0.24-py3-none-any.whl

Total release size: 1.4 MB

Release files / playwrightauthor-1.0.24.tar.gz

Download URL playwrightauthor-1.0.24.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
e0d9a156d52ae1be6e370713a1282b0e9d357e2cec345db6d994e25931a50bb8
BLAKE2b-256 checksum
How to use checksums
a120509523a03fa5b77b77498b0f8effe82717a9b67bcfa5061fa422a81c48a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / playwrightauthor-1.0.24-py3-none-any.whl

Download URL playwrightauthor-1.0.24-py3-none-any.whl
Size 85.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
299d7f931abbd81e57cab182c47b8d59f97ca2ea93e41d214eaf53aaa1f7d490
BLAKE2b-256 checksum
How to use checksums
c0b8d04a9e45d9e6d89316e144a560f77f70d941788c38b2bea6810f7a6bc53e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for playwrightauthor 1.0.24

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page