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.3.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.3.0.tar.gz.
File metadata
- Download URL: opensandbox_sdk-0.3.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 |
ea2b3e7f4c50b8e7ca0ac3b05efae6b35bddb444f6b63ad5802dda3a8c86a65b
|
|
| MD5 |
22eebd30ce4c6dd1e16b661f0e175f0a
|
|
| BLAKE2b-256 |
40a7a3f22edd8e61064ab16668f1997952b5879ae94b6ccd13d0dc985ba3b932
|
File details
Details for the file opensandbox_sdk-0.3.0-py3-none-any.whl.
File metadata
- Download URL: opensandbox_sdk-0.3.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 |
07614255f92f50f16cac7f40ed46c8d9e3ec8946081d0a8275cf71a0446b717e
|
|
| MD5 |
25238aaafa44a55029c50849befc20e0
|
|
| BLAKE2b-256 |
41e00b5223c7a06deaea0b61ffb8e73ca3cda4e0df0a4bb980b22cd803c5e432
|