runtime-sdk
runtime-sdk is the typed Python client for Runtime's 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 the API base URL and either an API key or a credential callback explicitly:
from runtime_sdk import RuntimeClient
client = RuntimeClient(
base_url="https://api.runruntime.dev",
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(
base_url="https://api.runruntime.dev",
credential=lambda: load_current_token(),
)
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
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 runtime_sdk-0.8.0-py3-none-any.whl.
File metadata
- Download URL: runtime_sdk-0.8.0-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f16607d69b78a834fd56f7ab98bbb0a2044544f4259d311c7289a84f220823b
|
|
| MD5 |
e6c1a66b3f52186fbb8100a290e2dec6
|
|
| BLAKE2b-256 |
23557c191998318036ac752e137739f20363a39e02e270ce8c23284368b8dd22
|