Python SDK for the All-in-One Sandbox API
Project description
Agent Sandbox Python SDK
A Python SDK for the All-in-One Sandbox API, providing access to sandbox, shell, file, jupyter, nodejs, and mcp services.
Installation
pip install agent-sandbox
Usage
from agent_sandbox import Sandbox
client = Sandbox(base_url="http://localhost:8091")
ctx = client.sandbox.get_sandbox_context()
print(ctx)
result = client.shell.exec_command(command="ls -la")
print(result)
Async Support
The SDK also provides async support through the AsyncSandbox class:
import asyncio
from agent_sandbox import AsyncSandbox
async def main():
client = AsyncSandbox(base_url="http://localhost:8091")
# Get sandbox context
ctx = await client.sandbox.get_sandbox_context()
print(ctx)
result = await client.shell.exec_command(command="ls -la")
print(result)
asyncio.run(main())
Features
- Sandbox: Access sandbox environment information and installed packages
- Shell: Execute shell commands with session management
- File: Read, write, search, and manage files
- Jupyter: Execute Python code in Jupyter kernels
- Node.js: Execute JavaScript code in Node.js environment
- MCP: Interact with Model Context Protocol servers
Requirements
- Python 3.8+
- httpx
- pydantic
- typing_extensions (for Python < 3.10)
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
agent_sandbox-0.0.2.tar.gz
(38.0 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 agent_sandbox-0.0.2.tar.gz.
File metadata
- Download URL: agent_sandbox-0.0.2.tar.gz
- Upload date:
- Size: 38.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e8ece3ed4e7fa3cb62d554024d13a161d3188901d10b6b426c2028839199892
|
|
| MD5 |
8279288aaa5d3737f85d0f5e86078bfa
|
|
| BLAKE2b-256 |
cdeaf22bb63ee44612c73009770a69464f13fb7b57697041252f43ce41c948e6
|
File details
Details for the file agent_sandbox-0.0.2-py2.py3-none-any.whl.
File metadata
- Download URL: agent_sandbox-0.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 76.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4070e40fb4c80b038cc87bd37952febadc243ce0ffc9f06e6a7291daaa8e2bc2
|
|
| MD5 |
faf90480c2d1d3fc98fa6b364707b86a
|
|
| BLAKE2b-256 |
60d9aedb2139f1ea00d8202912464d96537d4c2a1b456c8e307e90e645c91a0e
|