Skip to main content

Python SDK for the shared Chrome Bridge service

Project description

chrome-bridge-sdk

Python SDK for using chrome-bridge directly without an MCP client.

from chrome_bridge_sdk import ChromeBridge, SessionStatus

chrome = ChromeBridge(status_callback=lambda status: print(status.value))

async with chrome.session() as session:
    tabs = await session.browser_tabs()
    await session.browser_tab_select(tab_id=tabs[0].id)
    snapshot = await session.browser_snapshot()
    print(snapshot.title, snapshot.snapshot)

ChromeBridge stores configuration only. Entering session() discovers or starts the shared managed server, waits for the extension and FIFO lease, maintains its heartbeat, and releases it on every context exit. SessionStatus callbacks can drive application logs or startup UI.

The 21 high-level methods return frozen typed models such as Tab, Snapshot, Screenshot, ConsoleEntry, and Recording. Python parameters use snake_case, including browser_drag(start_element=..., start_ref=..., end_element=..., end_ref=...); browser_type(..., submit=False) does not require the common default explicitly. Screenshot.image_bytes decodes its Direct API base64 data.

For LLM adapters, session.tool_definitions() returns JSON Schema dictionaries and session.call(method, arguments) returns the raw Direct API JSON result. SDK exceptions expose code, retryable, and outcome_unknown attributes. Calls with an unknown outcome are never automatically retried.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chrome_bridge_sdk-0.3.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chrome_bridge_sdk-0.3.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file chrome_bridge_sdk-0.3.0.tar.gz.

File metadata

  • Download URL: chrome_bridge_sdk-0.3.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for chrome_bridge_sdk-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9aa3f612d0bebfe805996a87dfac97efb3f89c64bb9b724120c19743f03df5ae
MD5 9384e37b8a954e578c6ef8f6c90dc561
BLAKE2b-256 743e34536dd1ea64bcce4c6a0995cdc8bb6f7a9d5eb1da7e30141d4d764095f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for chrome_bridge_sdk-0.3.0.tar.gz:

Publisher: release-pypi.yml on kiarina/chrome-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chrome_bridge_sdk-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for chrome_bridge_sdk-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c778fa40922720fb0fa646ff2c5c8ef4fba66a7d8afe8a5b5ae30cdb58189bb
MD5 90a78a166554f707b2402176e5dd56d9
BLAKE2b-256 b71516f01387dfa80185c27feebcc51c5ac8d050b92d16d1c062caaf10aa7db7

See more details on using hashes here.

Provenance

The following attestation bundles were made for chrome_bridge_sdk-0.3.0-py3-none-any.whl:

Publisher: release-pypi.yml on kiarina/chrome-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page