Skip to main content

Python SDK for the Concave sandbox service - isolated code execution environments

Project description

Concave Sandbox Banner

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

concave_sandbox-0.1.2.tar.gz (586.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

concave_sandbox-0.1.2-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file concave_sandbox-0.1.2.tar.gz.

File metadata

  • Download URL: concave_sandbox-0.1.2.tar.gz
  • Upload date:
  • Size: 586.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for concave_sandbox-0.1.2.tar.gz
Algorithm Hash digest
SHA256 969701a1a0181797e55cb7ad9e49d0fc208fc065571303ab9606110e6a96f39e
MD5 aa46634209f93dddbd454949fa06347f
BLAKE2b-256 12b413b6513880cf7dec696895dd861b9508428c5a0e96d374e2595999a6a55c

See more details on using hashes here.

File details

Details for the file concave_sandbox-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for concave_sandbox-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e70f2fcbba822c6125eae9376f98292ecb9f49511c25c86bd620ac7de48797d6
MD5 3fa273f30a7969faf2df8fced19069ef
BLAKE2b-256 ede614faa412141255d21fa4e09ac77d9b5bee8a83be590b6c92ccf0b6377244

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page