Skip to main content

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 http://localhost:8080
api_key OPENSANDBOX_API_KEY (none)

License

MIT

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

opensandbox_sdk-0.1.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

opensandbox_sdk-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file opensandbox_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: opensandbox_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 5.0 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

Hashes for opensandbox_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c1bf8939566401355c7d3c52ed2b4e1b9ecc4b9caef7813a628c14ba3b836c1d
MD5 366710054fc096005e87f5ef6843177d
BLAKE2b-256 5e17a83ce8c68ec5f38a9da8673f0b7f6932ae4128fb1ce0d1d39e7abb3d12b4

See more details on using hashes here.

File details

Details for the file opensandbox_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: opensandbox_sdk-0.1.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

Hashes for opensandbox_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46a2d9b3b4dae12c4b666266faee86dca8107442cf5ffd389b843d64631a913f
MD5 025b616762aad302d4ed5c4b953c6e81
BLAKE2b-256 744092173106b9249d7de5a2df50e4fdcd9b2785d41b4d692c197153d6ceb313

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