UCloud Sandbox SDK - Cloud sandbox environments for AI agents
Project description
UCloud Sandbox Python SDK
UCloud Sandbox Python SDK 提供云端沙箱环境,用于安全运行 AI 生成的代码。
安装
pip install ucloud_sandbox
快速开始
1. 获取 API Key
- 访问 UCloud Sandbox 注册账号
- 在控制台获取 API Key
- 设置环境变量:
export UCLOUD_SANDBOX_API_KEY=your_api_key
2. 运行代码
from ucloud_sandbox import Sandbox
with Sandbox.create() as sandbox:
sandbox.run_code("x = 1")
execution = sandbox.run_code("x += 1; x")
print(execution.text) # 输出: 2
文档
TODO 访问 Sandbox 文档 获取更多信息。
致谢
本项目基于 E2B 开源项目开发,感谢 E2B 团队的贡献。
许可证
MIT License - 详见 LICENSE 文件
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
ucloud_sandbox-0.1.0b3.tar.gz
(93.6 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 ucloud_sandbox-0.1.0b3.tar.gz.
File metadata
- Download URL: ucloud_sandbox-0.1.0b3.tar.gz
- Upload date:
- Size: 93.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19f92e38e4d7b75fdb736ca2f8a87e8745d1665a1ac84d606c8004152cb9e1c3
|
|
| MD5 |
5bd2138aa451a25caf3a78c08947020e
|
|
| BLAKE2b-256 |
2755c40cb8b7a63a2804ec25e36b8d467b5653b2a74a42189cf8f10185bfc49b
|
File details
Details for the file ucloud_sandbox-0.1.0b3-py3-none-any.whl.
File metadata
- Download URL: ucloud_sandbox-0.1.0b3-py3-none-any.whl
- Upload date:
- Size: 189.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
728b2a73d8d7bccb25a9bea0abd7199bbf3c22ec99ed2ce2e739cb6dd9a0dbbd
|
|
| MD5 |
477d57b17cb94d0a3810cc8f92b1ae44
|
|
| BLAKE2b-256 |
6c3cdee8ced8731427cf5880b52b007ff0acb4e9b82c0e40ac4a7a0fcec209a0
|