Prime Sandboxes
raw JSON → 0.2.22 verified Fri May 01 auth: no python
Prime Intellect Sandboxes SDK for managing remote code execution environments. Current version 0.2.22, active development, weekly releases.
pip install prime-sandboxes Common errors
error ModuleNotFoundError: No module named 'prime_sandboxes.sandbox' ↓
cause Incorrect import path – users try to import from a submodule that doesn't exist.
fix
Use: from prime_sandboxes import Sandbox
error AttributeError: 'Sandbox' object has no attribute 'run' ↓
cause The method 'run' was renamed to 'execute' in v0.2.10.
fix
Replace sandbox.run(command) with sandbox.execute(command).
Warnings
gotcha Sandbox objects must be closed explicitly to release remote resources. Failing to call sandbox.close() may leave dangling environments. ↓
fix Use sandbox as a context manager: with Sandbox(api_key='...') as sb: ...
deprecated The prime_sandboxes.Session class is deprecated since v0.2.0. Use prime_sandboxes.Sandbox instead. ↓
fix Replace Session with Sandbox. The API is identical.
Imports
- Sandbox wrong
from prime_sandboxes.sandbox import Sandboxcorrectfrom prime_sandboxes import Sandbox
Quickstart
import os
from prime_sandboxes import Sandbox
api_key = os.environ.get('PRIME_API_KEY', 'your-api-key')
sandbox = Sandbox(api_key=api_key)
print(sandbox)