skillfed

prime-sandboxes

Prime Intellect Sandboxes SDK - Manage remote code execution environments

prime-sandboxes v0.2.36 511.5K downloads/30d#6,260 on PyPI286
Permissive license MIT Active released

What it is and what it does

Prime Sandboxes is a lightweight Python SDK for provisioning and managing remote code execution environments hosted on Prime Intellect infrastructure. It provides both synchronous and asynchronous clients to create Docker-based sandboxes, execute commands, upload and download files, and manage sandbox lifecycle—all with type-safe Pydantic models and automatic token caching. The SDK handles authentication via API key (direct, environment variable, or config file) and supports bulk operations, labels, filtering, and long-running background jobs with polling.

Typical use cases include running isolated workloads without local infrastructure, executing untrusted code safely, training models on remote hardware, or orchestrating multiple parallel jobs. The SDK is pure Python (~50KB installed) with no CLI dependencies, making it easy to embed in applications or scripts. It depends on aiofiles, certifi, httpx, protobuf, pydantic, pyqwest, tenacity, and connect-python for HTTP, async I/O, and resilience.

Use it for:

  • Run isolated Python scripts or ML training jobs on remote hardware without provisioning local infrastructure.
  • Execute untrusted or user-submitted code in a secure, containerized sandbox with resource limits.
  • Bulk-create and manage multiple sandboxes for parallel batch processing or experiment sweeps.
  • Upload data, run long-running background tasks (up to 24 hours), and download results asynchronously.
  • Integrate remote code execution into a larger application via sync or async Python APIs.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Python SDK for creating, managing, and executing code in remote Prime Intellect sandboxes—secure containerized environments with synchronous and asynchronous clients.

Yes. The package is actively maintained, has low install friction, carries no security vulnerabilities, and offers a clean API for remote sandbox management. Install it if you need to run code on Prime Intellect infrastructure or want a type-safe SDK for remote execution. The MIT license and broad Python version support (3.10–3.14) make it safe for production use.

Install

prime-sandboxes on PyPI

pip

pip install prime-sandboxes

uv

uv add prime-sandboxes

poetry

poetry add prime-sandboxes

Installing prime-sandboxes

Before you install

Low friction: pure Python wheel with no compiled dependencies. Active maintenance—released 2 days ago with 286 repository stars. Supports Python 3.10 through 3.14.

License in practice

MIT permissive license allows commercial and private use without restriction, making it suitable for proprietary projects.

Quickstart

from prime_sandboxes import APIClient, SandboxClient, CreateSandboxRequest

client = APIClient(api_key="your-api-key")
sandbox_client = SandboxClient(client)
request = CreateSandboxRequest(name="my-sandbox", docker_image="python:3.11-slim", cpu_cores=2, memory_gb=4)
sandbox = sandbox_client.create(request)
result = sandbox_client.execute_command(sandbox.id, "python --version")
sandbox_client.delete(sandbox.id)

Requires a valid Prime Intellect API key (via parameter, PRIME_API_KEY environment variable, or ~/.prime/config.json).

Verify before relying

  • Whether the SDK enforces rate limits or request quotas on sandbox creation or command execution.
  • Specific network or firewall requirements for connecting to Prime Intellect infrastructure.
  • Whether long-running jobs (timeout_minutes up to 1440) are guaranteed to persist across network interruptions.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 8 — aiofiles, certifi, connect-python, httpx, protobuf, pydantic, pyqwest, tenacity
Maintenance actively maintained — 2 days since the last release
Last repo commit
First released
Downloads 511,525/month — #6,260 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: prime_sandboxes-0.2.36-py3-none-any.whl

Keywords: cloud, containers, remote-execution, sandboxes, sdk

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python Modules

Tags

remote code execution sdksandbox management pythoncontainerized execution environmentssecure code sandbox apiasync remote executiondocker container orchestration sdkcloud sandbox provisioning
remote-executioncontainerizationasync-support

More Python Modules packages