--- id: opensandbox version: "0.1.15" license: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) license_treatment: permissive maintenance: active --- # opensandbox — OpenSandbox Python SDK - Secure, isolated execution environments License: permissive · Maintenance: active · Downloads: 185.2K/mo ## What it is and what it does OpenSandbox is a Python SDK for interacting with remote secure sandbox environments hosted by an OpenSandbox service. It abstracts the HTTP API (via httpx) and provides both async and synchronous interfaces to create sandboxes, execute shell commands, manage files, and monitor resource usage. The package includes lifecycle management (pause, resume, renew), context managers for resource cleanup, and a sandbox pool abstraction to reduce acquisition latency by maintaining a buffer of ready environments. The SDK targets developers who need to execute untrusted or isolated code safely—such as code evaluation platforms, CI/CD systems, or security research tools. It depends on attrs, pydantic, and python-dateutil for configuration and data modeling. Optional Redis support (via opensandbox[pool-redis]) enables distributed pool state management for multi-process or multi-pod deployments, though the core SDK works with in-memory state stores for development and single-process use. Use it for: - Execute untrusted user code safely in isolated environments for code evaluation or sandbox-as-a-service platforms. - Manage a pool of pre-warmed sandboxes to reduce latency in high-throughput code execution workloads. - Automate testing or security analysis workflows that require isolated file systems and process isolation. - Build CI/CD pipelines that need to run build steps or tests in ephemeral, secure containers. - Implement distributed sandbox orchestration across multiple processes or Kubernetes pods using Redis-backed pool state. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. OpenSandbox SDK provides low-level Python bindings to create, manage, and interact with remote secure sandbox environments, supporting shell command execution, file management, and resource monitoring through both async and sync APIs. Yes, if you have access to an OpenSandbox service and need a Python client for sandbox lifecycle and command execution. The package is actively maintained, has low install friction, and covers both async and sync use cases. However, note the alpha status (Development Status :: 3 - Alpha) and verify API stability guarantees before adopting in production; also confirm that the optional Redis pool backend meets your deployment model. ## Install pip install opensandbox uv add opensandbox poetry add opensandbox ## Installing opensandbox Before you install: Low install friction with four lightweight runtime dependencies (attrs, httpx, pydantic, python-dateutil). Active maintenance with recent releases and a healthy repository signal (12930 stars, last commit 2026-08-14). Supports Python 3.10–3.13. License in practice: Apache License 2.0 is permissive; you may use, modify, and distribute this package freely in commercial and open-source projects, provided you include the license text and document any changes. Quickstart: import asyncio from opensandbox.sandbox import Sandbox from opensandbox.config import ConnectionConfig async def main(): config = ConnectionConfig(domain="api.opensandbox.io", api_key="your-api-key") sandbox = await Sandbox.create("ubuntu", connection_config=config) try: execution = await sandbox.commands.run("echo 'Hello Sandbox!'") print(execution.logs.stdout[0].text) finally: await sandbox.destroy() asyncio.run(main()) Requires an active OpenSandbox service endpoint (domain and API key); the SDK is a client library and does not run sandboxes locally. Verify before relying: - Whether the optional Redis pool backend (opensandbox[pool-redis]) is production-ready or still alpha-stage. - Performance characteristics and latency of sandbox creation and command execution under load. - API stability guarantees given the Development Status :: 3 - Alpha classifier. ## Package facts - License: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 185.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags sandbox environment api, remote code execution sdk, isolated execution environments, docker sandbox management, secure code execution, sandbox pool management, container lifecycle control, sandbox-execution, async-sync, pool-management [View on SkillFed](https://skillfed.io/packages/opensandbox) · [View on PyPI](https://pypi.org/project/opensandbox/)