Skip to main content

runcloud

Python SDK for run.cloud.

pip install runcloud-sdk
runcloud login
from runcloud import Client

cloud = Client()
box = cloud.create(image="runcloud/agent-base", cpu=2, memory=4096)
try:
    result = box.exec("python -V")
    print(result.stdout)
finally:
    box.destroy()

Commands started through the Modal compatibility adapter stream output while they are running:

from runcloud.compat import modal

app = modal.App.lookup("my-app")
box = modal.Sandbox.create(app=app)
try:
    process = box.exec(
        "bash",
        "-c",
        "for i in {1..5}; do date +%T; sleep 0.5; done",
    )
    for line in process.stdout:
        print(line, end="")
    process.wait()
finally:
    box.terminate()

Client() automatically uses the credential saved by runcloud login. For automation, set RUN_CLOUD_API_KEY and optionally RUN_CLOUD_API_URL, or pass api_key and api_url directly.

A sandbox's name is a label you own: set it at create, change it later, and filter on it. Naming plus resume is how the same sandbox goes back to the same piece of work instead of booting a new one:

matches = cloud.list(name=f"project-{project_id}")
box = matches[0].resume() if matches else cloud.create(name=f"project-{project_id}")

box.rename(f"project-{project_id}-v2")
box.rename("")  # clears the label

Names are not unique and mean nothing to the platform, so check state on a match before using it. Renaming works in any state but destroyed.

Compatibility adapters

The same distribution includes migration adapters:

Provider Import
Modal from runcloud.compat import modal
E2B from runcloud.compat.e2b import Sandbox
Daytona from runcloud.compat.daytona import Daytona
Vercel Sandbox from runcloud.compat.vercel import Sandbox
Blaxel async from runcloud.compat.blaxel import SandboxInstance
Blaxel sync from runcloud.compat.blaxel import SyncSandboxInstance
Fly Sprites from runcloud.compat.sprites import SpritesClient

The Daytona adapter follows Daytona SDK 2: Daytona().v2 has the v2 API (create(image, resources=..., env=..., labels=...), sandbox.exec(...), delete), and Daytona().v0 and the client itself keep the 0.x API. Daytona 2 sizes CPU in cores of 2 vCPUs, so Resources(cpu=1, cpu_max=2) reserves 2 vCPUs and bursts to 4. The Vercel adapter accepts Vercel Sandbox 5's managed images (vercel/sandbox/node:24); they run on run.cloud's default image. v2 keeps create-time env in /var/lib/runcloud/daytona-env.json in the sandbox, so a handle from get(id) uses it too. timeout limits only the wait for a result; execution_timeout is when the guest kills the command. stop and start raise, because run.cloud has no stop that discards memory: use pause and resume. A create with the name of a live sandbox returns it.

Adapters cover creation, command execution, lookup/listing, and destruction where the upstream SDK exposes them. Blaxel's current SandboxInstance API is async; SyncSandboxInstance preserves its synchronous API. Unsupported provider-specific features raise UnsupportedCompatibilityFeatureError with a migration hint. They do not silently pretend that run.cloud implements a provider-specific feature.

Metadata

Release files for runcloud-sdk 0.15.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for runcloud-sdk 0.15.0
File Size Uploaded Provenance Actions
runcloud_sdk-0.15.0.tar.gz 24.4 kB With provenance Details for runcloud_sdk-0.15.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for runcloud-sdk 0.15.0
File Interpreter ABI Platform Actions
runcloud_sdk-0.15.0-py3-none-any.whl Python 3 none any Details for runcloud_sdk-0.15.0-py3-none-any.whl

Total release size: 44.6 kB

Release files / runcloud_sdk-0.15.0.tar.gz

Download URL runcloud_sdk-0.15.0.tar.gz
Size 24.4 kB
Tags Source
SHA-256 checksum
How to use checksums
862c4bdc9a64c985e5831819690e3d66bac5f43632ad29f51ea077366ac6f7b1
BLAKE2b-256 checksum
How to use checksums
327d47d915795df842de08a1420b9fe977d2a14689b515c078289cc3c94759fe
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 29, 2026.

Transparency log

Release files / runcloud_sdk-0.15.0-py3-none-any.whl

Download URL runcloud_sdk-0.15.0-py3-none-any.whl
Size 20.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed89782f2cc8f72c503c34cfa579fac1c8464d76a61f7c463039d9df78e96434
BLAKE2b-256 checksum
How to use checksums
4606f1a14ad9f5455a77908f88cb8090fdab3b07ddfe83bdf6454127b584e8ce
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 29, 2026.

Transparency log

Security for runcloud-sdk 0.15.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.

Select from 2 files

Attestation for runcloud_sdk-0.15.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 29, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page