runtime-sdk
runtime-sdk is the typed Python client for the Cool Computers HTTP API. It is separate
from the standalone runtime CLI and does not read or write CLI credentials.
Install
python -m pip install runtime-sdk
Use
Pass an API key or credential callback. The client uses the Cool Computers API by default:
from runtime_sdk import RuntimeClient
client = RuntimeClient(
credential="sk_runtime_...",
)
computer = client.create_computer(slug="buildbox")
result = client.run_command(computer["id"], "uname -a")
print(result["stdout"])
client.delete_computer(computer["id"])
Credential callbacks are useful when the caller owns token rotation:
client = RuntimeClient(
credential=lambda: load_current_token(),
)
Pass base_url explicitly only when targeting another deployment. Explicit values are
used as provided, apart from removing trailing slashes.
Methods accept a stable computer ID or slug where computer_id is named.
Authentication, validation, and HTTP failures raise RuntimeAPIError.
Develop and release
cd backend
uv sync
uv run python -m unittest discover -s scripts/tests -p 'test_*.py'
uv run mypy scripts/runtime_sdk scripts/tests/runtime_sdk_typecheck_example.py
./scripts/release_runtime_sdk.sh
The release script builds one universal py3-none-any wheel. The wheel contains
only the Python client, response types/validation, transport, and py.typed; it
does not install a runtime command or bundle OpenTUI.
Metadata
Release files for runtime-sdk 0.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| runtime_sdk-0.8.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / runtime_sdk-0.8.1-py3-none-any.whl
| Download URL | runtime_sdk-0.8.1-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3cb9b3ae78d9a39802db980779602d1958f8ae16acecf01c185e5bb9132c47ea
|
|
BLAKE2b-256 checksum How to use checksums |
c581836a1f00b3946385920f0d333be7b007492ebf5bbeab09f7240e2e915f87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|