Python SDK for the Concave sandbox service - isolated code execution environments
Project description
What is Concave Sandbox?
Spin up isolated execution environments at scale. Run untrusted code, train RL agents, power autonomous research systems, or build interactive compute experiences—all in secure, high-performance sandboxes.
Features
- Secure Isolation: Complete VM-level isolation using Firecracker microVMs—every sandbox runs in its own kernel
- Blazing Fast: Full VM boot up in under 200ms
- Simple API: Clean, intuitive Python interface with context manager support
- Production Ready: Comprehensive error handling and type hints
Installation
pip install concave-sandbox
Quick Start
Get Your API Key
Sign up at concave.ai to get your API key.
Simple Example
from concave import sandbox
with sandbox(name="my-sandbox", api_key="cnc_your_api_key_here") as sbx:
result = sbx.run("print('Hello from Concave!')")
print(result.stdout) # Hello from Concave!
# Sandbox is automatically deleted when done
Manual Cleanup
If you prefer to manage the sandbox lifecycle yourself:
from concave import Sandbox
sbx = Sandbox.create(name="my-sandbox", api_key="cnc_your_api_key_here")
# Execute shell commands
result = sbx.execute("uname -a")
print(result.stdout) # Linux ...
# Run Python code
result = sbx.run("print('Hello from Concave!')")
print(result.stdout) # Hello from Concave!
# Clean up
sbx.delete()
Documentation
For complete API reference, advanced examples, error handling, and best practices, visit docs.concave.ai.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file concave_sandbox-0.1.1.tar.gz.
File metadata
- Download URL: concave_sandbox-0.1.1.tar.gz
- Upload date:
- Size: 581.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5db540ed515e1d159cbff67e231b94093e2fbaec45c42ed99dece02846f4f657
|
|
| MD5 |
a537ba2dc754b86ab989dd100503fe98
|
|
| BLAKE2b-256 |
271409607f17bdbb537dd1134662fc7776ad2ae61a452b27536bbf8ff4ecb759
|
File details
Details for the file concave_sandbox-0.1.1-py3-none-any.whl.
File metadata
- Download URL: concave_sandbox-0.1.1-py3-none-any.whl
- Upload date:
- Size: 579.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05b91b1247580aa453f501b57e3f00baed15f0837c8a9651ed9851163ecf7d0e
|
|
| MD5 |
0882996bd5faf36bd79d3664e62de0d7
|
|
| BLAKE2b-256 |
9cc4e5eda26469b66570548fafc183ce23c47bee32b21ca0c8fbaa5f511a7767
|