cwsandbox
A Python client library for CoreWeave Sandbox
What it is and what it does
cwsandbox is a gRPC-based Python client for CoreWeave's container sandbox service. It lets you spawn isolated container environments, execute commands inside them, and manage their lifecycle—all from Python code. The library supports both synchronous and asynchronous workflows, with a context-manager interface for automatic cleanup and a hybrid API that returns futures you can block on or await.
You'd use this when you need to run untrusted code, perform isolated computations, or execute workloads on CoreWeave's infrastructure without managing containers directly. It abstracts away the gRPC plumbing and provides a Pythonic interface for sandbox creation, command execution, and result retrieval.
Use it for:
- Execute untrusted or user-supplied code in an isolated container without risking your host environment.
- Run remote computational tasks on CoreWeave infrastructure and retrieve results asynchronously.
- Build multi-step workflows where each step runs in a fresh, isolated sandbox container.
- Integrate sandbox execution into async Python applications using the native async/await API.
- Prototype or test code in ephemeral containers without managing Docker or Kubernetes directly.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python client library for running and managing isolated container sandboxes on CoreWeave infrastructure, with both sync and async APIs for executing commands and managing sandbox lifecycle.
Yes, if you are building on CoreWeave's sandbox service. The library is actively maintained, has low install friction, carries no known vulnerabilities, and provides a clean Pythonic interface to a specialized infrastructure service. Not applicable if you don't have CoreWeave infrastructure access or need a general-purpose container client.
Install
cwsandbox on PyPI
pip
pip install cwsandboxuv
uv add cwsandboxpoetry
poetry add cwsandboxInstalling cwsandbox
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance as of release date. Depends on googleapis-common-protos, grpcio, and protobuf for gRPC communication.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial and private use with attribution. Examples are separately licensed under BSD-3-Clause.
Quickstart
pip install cwsandbox
from cwsandbox import Sandbox
sb = Sandbox.run("echo", "Hello, World!")
sb.stop().result()
Requires Python 3.11 or later. Sandbox execution requires connectivity to CoreWeave infrastructure.
Verify before relying
- Whether CoreWeave account/credentials are required to use the Sandbox API
- Pricing or rate limits for sandbox execution on CoreWeave infrastructure
- Whether the library supports on-premise or self-hosted sandbox deployments
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<4,>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — googleapis-common-protos, grpcio, protobuf |
| Maintenance | actively maintained — 0 days since the last release |
| First released | |
| Downloads | 602,312/month — #5,815 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cwsandbox-1.0.0-py3-none-any.whl
Tags
More Distributed Computing packages
gRPC Python is an HTTP/2-based RPC framework…
permissive · top 100 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
cloudpickleCloudpickle extends Python's standard pickle…
permissive · top 1,000 on PyPI
smart-openProvides a unified, open()-compatible Python…
permissive · top 1,000 on PyPI
portalockerPortalocker provides cross-platform file…
permissive · top 1,000 on PyPI
rayRay is a distributed computing framework that…
permissive · top 1,000 on PyPI
contree-sdkPython SDK for ConTree, a container runtime…
permissive · top 15,000 on PyPI
llm-sandboxExecutes code generated by large language…
unclear · top 15,000 on PyPI
k8s-agent-sandboxA Python client library for creating and…
permissive · top 15,000 on PyPI
prime-sandboxesPython SDK for creating, managing, and…
permissive · top 15,000 on PyPI
opensandboxOpenSandbox SDK provides low-level Python…
permissive · top 15,000 on PyPI
e2b-desktopProvides a Python SDK to create and control…
permissive · top 15,000 on PyPI
hyperlight-sandboxHyperlight-sandbox provides a Python API for…
permissive · top 15,000 on PyPI
koyeb-sdkOfficial Python SDK for Koyeb that provides…
permissive · top 15,000 on PyPI
e2bE2B provides a Python SDK to create and control…
permissive · top 5,000 on PyPI
cloudshell-shell-coreProvides the base driver interface and context…
permissive · top 15,000 on PyPI