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

Uploaded Python 3

File details

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

File metadata

  • Download URL: chrome_bridge_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 8.4 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.2.0.tar.gz
Algorithm Hash digest
SHA256 ce4781e0a6239da54c947517e2985e632c6db482dace3507f433051f312d437d
MD5 33178020e241a5fcbaeb2cc5f7017a7f
BLAKE2b-256 e474ed13f2c13336a87b0b6faba45c3429180fd31f3b1eb1ad64a67919b08745

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for chrome_bridge_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 96abe7a72185270d5f325fb25e46b063d04b3e302d54c29c74a936dd47982cd8
MD5 c4d50d6e2a67246e55bd3b14e4d7258f
BLAKE2b-256 b555d3e32adc4582e3768b3c221cf1219c8f2d3a155f573c8e10d8b88206c949

See more details on using hashes here.

Provenance

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