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
Browsermaps 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.
connectrequires{"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
- Explicit options:
connect({"endpoint": ..., "token": ...}) - Environment:
KERES_GATEWAY_ENDPOINT,KERES_GATEWAY_TOKEN - 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-sdk 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| keres_sdk-0.1.0.tar.gz | 34.6 kB | Without provenance | Details for keres_sdk-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| keres_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for keres_sdk-0.1.0-py3-none-any.whl |
Total release size: 62.7 kB
Release files / keres_sdk-0.1.0.tar.gz
| Download URL | keres_sdk-0.1.0.tar.gz |
|---|---|
| Size | 34.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c34ad2f3378c44c029a5205a903ef69550ce5df72378f47e6f5cf6e7273d3701
|
|
BLAKE2b-256 checksum How to use checksums |
a383d2679d268ff824ed2afc88784a204f64653d88ff8e6436f98a6e27ec7fbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / keres_sdk-0.1.0-py3-none-any.whl
| Download URL | keres_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 28.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3487a87aed53b33cc72adace8560b44571241437d52e427b702175918908e018
|
|
BLAKE2b-256 checksum How to use checksums |
9990b64e67f9d669ed384828290f366c477edee160fbdba6f887c21fadecbdcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Security for keres-sdk 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.