Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt

Use this file to discover all available pages before exploring further.

The cwsandbox Python Client provides a high-level SDK for creating and managing CoreWeave sandbox environments. It supports both synchronous and asynchronous workflows through a unified API.
CoreWeave sandboxes are currently in limited availability. Contact CoreWeave Support or email [email protected] for access.

Installation

uv pip install cwsandbox

Quick start

Create a sandbox, run a command, and retrieve the result:
from cwsandbox import Sandbox

# Context manager for automatic cleanup
with Sandbox.run(container_image="python:3.11") as sb:
    result = sb.exec(["python", "-c", "print(2 + 2)"]).result()
    print(result.stdout)  # 4
The same API works in async contexts:
from cwsandbox import Sandbox

async with Sandbox.run() as sb:
    result = await sb.exec(["python", "-c", "print(2 + 2)"])
    print(result.stdout)  # 4

Next steps

Get started

End-to-end walkthrough from creating a profile and enabling a runner to running your first sandbox from the SDK.

Tutorial

Step-by-step walkthrough of configuration, command execution, file operations, and cleanup with the SDK.

Guides

In-depth guides on specific topics including lifecycle management, file operations, execution patterns, and troubleshooting.
Last modified on May 6, 2026