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.1.tar.gz (581.7 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.1-py3-none-any.whl (579.0 kB view details)

Uploaded Python 3

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

Hashes for concave_sandbox-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5db540ed515e1d159cbff67e231b94093e2fbaec45c42ed99dece02846f4f657
MD5 a537ba2dc754b86ab989dd100503fe98
BLAKE2b-256 271409607f17bdbb537dd1134662fc7776ad2ae61a452b27536bbf8ff4ecb759

See more details on using hashes here.

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

Hashes for concave_sandbox-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 05b91b1247580aa453f501b57e3f00baed15f0837c8a9651ed9851163ecf7d0e
MD5 0882996bd5faf36bd79d3664e62de0d7
BLAKE2b-256 9cc4e5eda26469b66570548fafc183ce23c47bee32b21ca0c8fbaa5f511a7767

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