Python SDK for OpenSandbox - E2B-compatible sandbox platform
Project description
opensandbox-sdk
Python SDK for OpenSandbox — an open-source, E2B-compatible sandbox platform.
Install
pip install opensandbox-sdk
Quick Start
import asyncio
from opensandbox import Sandbox
async def main():
sandbox = await Sandbox.create(template="base")
# Execute commands
result = await sandbox.commands.run("echo hello")
print(result.stdout) # "hello\n"
# Read and write files
await sandbox.files.write("/tmp/test.txt", "Hello, world!")
content = await sandbox.files.read("/tmp/test.txt")
# Clean up
await sandbox.kill()
await sandbox.close()
asyncio.run(main())
Configuration
| Parameter | Env Variable | Default |
|---|---|---|
api_url |
OPENSANDBOX_API_URL |
https://app.opensandbox.ai |
api_key |
OPENSANDBOX_API_KEY |
(none) |
License
MIT
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
opensandbox_sdk-0.2.0.tar.gz
(5.1 kB
view details)
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 opensandbox_sdk-0.2.0.tar.gz.
File metadata
- Download URL: opensandbox_sdk-0.2.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6f9c593a7d7405aba4b11fd8e2c81e576477e64cedb2a6eef7fae12b8eca6f8
|
|
| MD5 |
459afe35ea482a013a89d10d28ebe32c
|
|
| BLAKE2b-256 |
207885742d71f23e11ee495b034317126a30094d7bf95a8914cf3324af7e4a28
|
File details
Details for the file opensandbox_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: opensandbox_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccc46b8e63458b212ea3bd1a87e4b21d1aaf7055ea2b7793331ffc1d72151cd5
|
|
| MD5 |
cbb11b85384b255f1c9dd83a05cd73b5
|
|
| BLAKE2b-256 |
1d76a90bff980f864ba206fd3a63042dfa22298c4da813b4cffda1ecb8e41e86
|