raytrace-sdk
Create and drive RayTrace cloud sandboxes from Python. Every coding-agent session in a sandbox is recorded to your organization's dashboard.
pip install raytrace-sdk
Python 3.10 or newer. No dependencies.
Authenticate
Create an org API key on your RayTrace account page (Account → API keys) and set it in the environment:
export RAYTRACE_API_KEY=rtk_...
Or pass it directly: RayTrace(api_key="rtk_...").
Quickstart
from raytrace_sdk import RayTrace
rt = RayTrace()
# Upload a project folder (.git, .env, keys and credentials are left out).
sandbox = rt.sandboxes.create(name="my-app", directory=".", size="small")
result = sandbox.exec("pytest", timeout_seconds=300)
print(result.exit_code, result.stdout)
sandbox.stop()
Sandboxes
| Call | What it does |
|---|---|
rt.sandboxes.create(name=, size=, directory= | files= | archive=) |
New sandbox from a folder, an in-memory file map, or .tar.gz bytes |
rt.sandboxes.list() / rt.sandboxes.get(id) |
Your organization's sandboxes |
sandbox.exec(command, timeout_seconds=) |
Runs a command and waits for the result (exit_code, stdout, stderr, state) |
sandbox.stop() |
Stops it; files are kept and billing stops |
sandbox.start(size=) |
Starts it again, restoring an archived sandbox first |
sandbox.keep_alive(minutes) |
Holds off the idle stop for a long-running job (up to 4 hours) |
sandbox.destroy(keep_traces=) |
Deletes it; keep_traces=True keeps its recordings on paid plans |
sandbox.status, sandbox.size |
From the last fetch |
Sizes are small, medium and large.
Usage and keys
rt.usage.get(days=30) # credits spent and remaining
rt.api_keys.create("ci") # the key is returned once
rt.api_keys.list()
rt.api_keys.revoke(key_id)
Billing and errors
Running sandboxes are paid from prepaid credits in 15-minute blocks, and stop by themselves after 15 minutes of no activity. Failed calls raise RayTraceError with status and code:
code |
Meaning |
|---|---|
insufficient_balance |
Not enough credit for the next 15 minutes; top up on the account page |
recording_plan_required |
Cloud sandboxes need an Individual or Team plan |
no_capacity |
No room right now; retry shortly |
The full HTTP contract is in docs/v1-contract.md.
Metadata
Release files for raytrace-sdk 0.1.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 | Actions |
|---|---|---|---|---|
| raytrace_sdk-0.1.0.tar.gz | 8.2 kB | With provenance | Details for raytrace_sdk-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| raytrace_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for raytrace_sdk-0.1.0-py3-none-any.whl |
Total release size: 15.9 kB
Release files / raytrace_sdk-0.1.0.tar.gz
| Download URL | raytrace_sdk-0.1.0.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be3439b16b3528fe538ca983c5d7869d76ae6f77f4bdffe06cb9e9ab4664d05b
|
|
BLAKE2b-256 checksum How to use checksums |
00f40a893f991a6793694ccf4806c1cbac5d6d520a40236209e9c4bbe5887b3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 23, 2026.
Transparency logRelease files / raytrace_sdk-0.1.0-py3-none-any.whl
| Download URL | raytrace_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83633eb014d09497090bbcc15f62d36618fde699469a411cb8d4ba7f8a6a57f4
|
|
BLAKE2b-256 checksum How to use checksums |
e9bb93244d83a79d3aaf876c1c2d249812676708bc6e492705b020f7a6dd65a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 23, 2026.
Transparency logSecurity for raytrace-sdk 0.1.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
Both files in this release have been uploaded with provenance metadata.
Attestation for raytrace_sdk-0.1.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 Nov 23, 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.