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,
agent="stagehand",
)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bctrl-0.1.3.tar.gz.
File metadata
- Download URL: bctrl-0.1.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b38e6b99dbf81f81c339d53fe3f5325fb1cdffd8683ba05292de94f364b90f91
|
|
| MD5 |
d0208dc0889739bcfbafba0495d4b731
|
|
| BLAKE2b-256 |
c9ae7b633eaac5cba85c6377b44c47c9871e290f3c5c6e8c19c703f762488d14
|
Provenance
The following attestation bundles were made for bctrl-0.1.3.tar.gz:
Publisher:
publish.yml on bctrlhq/sdk-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bctrl-0.1.3.tar.gz -
Subject digest:
b38e6b99dbf81f81c339d53fe3f5325fb1cdffd8683ba05292de94f364b90f91 - Sigstore transparency entry: 2501586411
- Sigstore integration time:
-
Permalink:
bctrlhq/sdk-py@54d502230fd2b5828f5ed6ff8b22a2d062e3722c -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/bctrlhq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@54d502230fd2b5828f5ed6ff8b22a2d062e3722c -
Trigger Event:
push
-
Statement type:
File details
Details for the file bctrl-0.1.3-py3-none-any.whl.
File metadata
- Download URL: bctrl-0.1.3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72afb97c878c24012df0d4500720ea5775529dc291a1543e41cf13ce25908ae8
|
|
| MD5 |
3c00357b4202ebff09e48e98cc67cc1f
|
|
| BLAKE2b-256 |
21a3ef945849b06787a74710e252c6c35f2fe5e434cddb92d169540bbfe26552
|
Provenance
The following attestation bundles were made for bctrl-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on bctrlhq/sdk-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bctrl-0.1.3-py3-none-any.whl -
Subject digest:
72afb97c878c24012df0d4500720ea5775529dc291a1543e41cf13ce25908ae8 - Sigstore transparency entry: 2501586448
- Sigstore integration time:
-
Permalink:
bctrlhq/sdk-py@54d502230fd2b5828f5ed6ff8b22a2d062e3722c -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/bctrlhq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@54d502230fd2b5828f5ed6ff8b22a2d062e3722c -
Trigger Event:
push
-
Statement type: