bctrl
Python SDK for the BCTRL public API.
The current generated public API is available from bctrl.api, including an async client:
import os
from bctrl.api import Bctrl, AsyncBctrl
client = Bctrl(token=os.environ["BCTRL_API_KEY"])
spaces = client.spaces.list()
The root entrypoint below retains the previous helper API for existing callers.
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
Metadata
Release files for bctrl 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bctrl-0.2.0.tar.gz | 401.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bctrl-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.4 MB
Release files / bctrl-0.2.0.tar.gz
| Download URL | bctrl-0.2.0.tar.gz |
|---|---|
| Size | 401.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
99e171d90ad93b651f64f33e195db2f9f627c73d08728f07e78ca76e1283536f
|
|
BLAKE2b-256 checksum How to use checksums |
c59b830485dbf4a6a170dffffef6111166e68e9954fcef38b7636143deb92014
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logRelease files / bctrl-0.2.0-py3-none-any.whl
| Download URL | bctrl-0.2.0-py3-none-any.whl |
|---|---|
| Size | 1.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98c2fbc5432b225cd56438986dca65fd1f2a22fab69d8cc3cd8b1e4adde71d04
|
|
BLAKE2b-256 checksum How to use checksums |
fddd8d41a3cb2e26f5f99b6d431e7a67cb82a607bc97c4e83b960efd208f13f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logSecurity for bctrl 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for bctrl-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.