Skip to main content

keres-playwright

Playwright-compatible automation client for Keres Browser. Connects to the local Keres Automation Gateway; Keres owns profiles, sessions, and the browser runtime (Chromium, Gecko, Camoufox).

Keres is a web browser, profile manager, and automation platform. This client drives browsers through a governed local API — it makes no claims about bypassing third-party systems.

Install

Until the package is published to PyPI (tracked in Stage 17), install from the repository checkout:

pip install -e path/to/keres/compatibility/python

Requires Python 3.10+ and the Keres desktop app running locally.

Quickstart

from keres_playwright import keres

browser = keres.connect({"profile": "sales-profile"})
page = browser.new_page()
page.goto("https://example.com")
print(page.title())
page.get_by_role("button", name="Sign in").click()
browser.close()  # disconnects; the profile stays alive in Keres

Async flavor:

import asyncio
from keres_playwright.async_api import keres

async def main():
    browser = await keres.connect({"profile": "sales-profile"})
    page = await browser.new_page()
    await page.goto("https://example.com")
    print(await page.title())
    await browser.close()

asyncio.run(main())

Concepts

  • Profile ≠ Context. A Browser maps onto one Keres session bound to the profile chosen at connect time. Persistent identity (cookies, storage, network configuration) lives with the Keres profile — not with this handle.
  • close() is disconnect-only. Sessions and profiles remain managed by Keres after the client disconnects.
  • Explicit profiles. connect requires {"profile": ...}; desktop-user sessions are never adopted silently.
  • Auto-waiting is server-side, delegated to the Keres Automation API wait engine. The client builds no second waiting implementation.

Errors

Error names follow Playwright conventions (TimeoutError, ...) while every error carries the original structured Keres code:

from keres_playwright import TimeoutError, KeresError

try:
    page.goto("https://example.com", timeout_ms=5000)
except TimeoutError as exc:
    print(exc.code)  # e.g. NAVIGATION_TIMEOUT

Endpoint and token resolution

  1. Explicit options: connect({"endpoint": ..., "token": ...})
  2. Environment: KERES_GATEWAY_ENDPOINT, KERES_GATEWAY_TOKEN
  3. Discovery file published by the running app: %APPDATA%\com.keres.browser\gateway\endpoint.json (Windows), ~/Library/Application Support/com.keres.browser/gateway/endpoint.json (macOS), $XDG_CONFIG_HOME/com.keres.browser/gateway/endpoint.json (Linux). Reveal the token in Keres Settings → Developer automation.

The token is sent as the first WebSocket frame — never placed in URLs or logs.

Capability matrix

Engine support per operation is documented in api/PLAYWRIGHT_API.md; unsupported operations raise UnsupportedCapabilityError naming the engine.

License

MIT

Metadata

Release files for keres-playwright 0.1.0

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

Source distribution (sdist)

Source distribution for keres-playwright 0.1.0
File Size Uploaded Provenance Actions
keres_playwright-0.1.0.tar.gz 31.9 kB Without provenance Details for keres_playwright-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for keres-playwright 0.1.0
File Interpreter ABI Platform Actions
keres_playwright-0.1.0-py3-none-any.whl Python 3 none any Details for keres_playwright-0.1.0-py3-none-any.whl

Total release size: 59.3 kB

Release files / keres_playwright-0.1.0.tar.gz

Download URL keres_playwright-0.1.0.tar.gz
Size 31.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5d127076064e5e097c419e201a67d13dc093823cf825291a48cbb6e4d83ac0cc
BLAKE2b-256 checksum
How to use checksums
583928948c8fba04b114897c603b19a8e7abc073a336c244896935e2179b50c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / keres_playwright-0.1.0-py3-none-any.whl

Download URL keres_playwright-0.1.0-py3-none-any.whl
Size 27.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3440e664bdba28b6df87b7f11675372abaf044c284ccb408675c613fae41cb20
BLAKE2b-256 checksum
How to use checksums
dd4d1da576061e5aaae03f049ff32a763ce853b23b3f44d6f98e1c3169b77f59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for keres-playwright 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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