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.1

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.1
File Size Uploaded Provenance Actions
keres_playwright-0.1.1.tar.gz 15.4 kB Without provenance Details for keres_playwright-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 21.4 kB

Release files / keres_playwright-0.1.1.tar.gz

Download URL keres_playwright-0.1.1.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ddf1e3014e84661e8132b7e1942079c7042f8169696391d5552e7d2ce7d69a00
BLAKE2b-256 checksum
How to use checksums
d5969eb5bf3a7397eee7e3e2ef68ece65765b21e28eebe71dd23d57c72e2ad8e
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.1-py3-none-any.whl

Download URL keres_playwright-0.1.1-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b37db879ea8e51dc6f86e96245a34f98058d5d5bf3fd9a1f5f67c84b09eaf07
BLAKE2b-256 checksum
How to use checksums
4938cd8ac512620524d79b9177a967ab873bc1d67b0311fdd8d76ff4ada00dfc
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.1

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.1 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