skillfed

cwsandbox

A Python client library for CoreWeave Sandbox

cwsandbox v1.0.0 602.3K downloads/30d#5,815 on PyPI
Permissive license Apache-2.0 Active released

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 cwsandbox

uv

uv add cwsandbox

poetry

poetry add cwsandbox

Installing 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

Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

container sandbox clientisolated execution environmentremote command executioncoreweave sandbox apiasync container managementsandbox lifecycle controlgrpc container client
grpc-clientcontainer-executionasync-support

More Distributed Computing packages