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.

See the changelog for user-visible changes.

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.4.0.tar.gz (10.2 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.4.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chrome_bridge_sdk-0.4.0.tar.gz
  • Upload date:
  • Size: 10.2 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.4.0.tar.gz
Algorithm Hash digest
SHA256 b48c3640455c06b861a360f0023684ea0b00fb5717a41b33d5088dbbe7d66ed5
MD5 5c77928c0a5b9b4a079c6fae542ae590
BLAKE2b-256 f525752ff1df9e87076bf5128945aad2cf4f0da719ea9353e6d4a073ea8ed53f

See more details on using hashes here.

Provenance

The following attestation bundles were made for chrome_bridge_sdk-0.4.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.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for chrome_bridge_sdk-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7f3679bdba75fb17d7fdd8104781a0422e4c34f7bc77a52bb287e9b85301059
MD5 6c3f4d4e2b9f47ff601f132d5906995b
BLAKE2b-256 388e9137626f9b4e35aeb29e8b75cd7462981f0aedce0d3af541cc62098f99fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for chrome_bridge_sdk-0.4.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