Skip to main content

bctrl

Python SDK for the BCTRL public API.

Install

pip install bctrl

Quick Start

from bctrl import Bctrl

bctrl = Bctrl(api_key="bctrl_...")

with bctrl.runtimes.started_browser(name="checkout") as browser:
    print(browser.cdp_url)

    conversation = bctrl.conversations.create(
        runtime_id=browser.runtime_id,
    )
    bctrl.conversations.messages.create(
        conversation["id"],
        text="Extract the invoice number and total.",
    )
    for event in bctrl.conversations.stream(conversation["id"]):
        print(event)

Python methods use snake_case; the SDK sends the API's camelCase fields on the wire. For example, runtime_path becomes runtimePath.

Human-facing Views

Views are the supported way to share live progress and recordings. The bearer URL is returned only when the view is created:

view = bctrl.views.create(
    scope={"runtime_id": "runtime_..."},
    components={
        "live": {"control": "none"},
        "recordings": {},
    },
    expires_in_seconds=3600,
)

print(view["url"])

Set the chrome=none query parameter before the URL fragment when embedding the complete white-label view in your own application. Organization branding is managed with bctrl.account.get() and bctrl.account.update(...). Signed event delivery is managed through bctrl.webhooks, including secret rotation, delivery inspection, and redelivery.

Design

  • Sync-first client.
  • Route-first namespaces that mirror the API reference.
  • Raw response bodies as dictionaries.
  • Python context managers for runtime lifecycle cleanup.
  • Typed built-in Tool inputs generated from the canonical Tool registry.
  • Sync SSE iterators for Conversations and unified Run streams.
  • Explicit helpers for pagination and multipart uploads.
  • No hidden follow-up requests or stateful resource refreshes.

License

ISC

Download files

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

Source Distribution

bctrl-0.1.5.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

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

bctrl-0.1.5-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file bctrl-0.1.5.tar.gz.

File metadata

  • Download URL: bctrl-0.1.5.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for bctrl-0.1.5.tar.gz
Algorithm Hash digest
SHA256 0f5c704ec6f2e75cb8345ab702604e7a83bf1a51ade4679e91e1e5574e3b06f3
MD5 f17549eda648432a697fc078c0752b77
BLAKE2b-256 3db7c889b30dd98310f1afed4705162b704b468ee3636c5ea8cfa13e8bfd4892

See more details on using hashes here.

Provenance

The following attestation bundles were made for bctrl-0.1.5.tar.gz:

Publisher: publish.yml on bctrlhq/sdk-py

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

File details

Details for the file bctrl-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: bctrl-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for bctrl-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bf31cfb842c11541faa0659696aa741e1959b2d10804602952d552afedf0f020
MD5 6824004d55a5c00db4610eb694121a79
BLAKE2b-256 b1997c2f8b1a45ff1f6ae1fb1d5b4d990610e2c47a96b104ac940e1ef992f7b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for bctrl-0.1.5-py3-none-any.whl:

Publisher: publish.yml on bctrlhq/sdk-py

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

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.1

2 files

Supported by

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