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.4.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.4-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bctrl-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 62463e2c6e699ea577095cbda6d5ddd0b43ef0bb33902e3ca6ea86942c6763d9
MD5 dfebab7a86016c3f4e1f58a5410a4a70
BLAKE2b-256 c0938ded2c8330ce268cb5184538732490de0bb99a54140734c1ae91dad66756

See more details on using hashes here.

Provenance

The following attestation bundles were made for bctrl-0.1.4.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.4-py3-none-any.whl.

File metadata

  • Download URL: bctrl-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2ae2278734a95ee63f27b03a45db5a005b323b7a1f473913c76e89b1fef64e39
MD5 eda5d4e87343667bf6e7ac08a5cc5b1d
BLAKE2b-256 a8124fec16354dfe1230298e382809e02b0516978aa64aeadde55f94e9458198

See more details on using hashes here.

Provenance

The following attestation bundles were made for bctrl-0.1.4-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

0.1.5

2 files

This release

0.1.4 This release

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