Skip to main content

agentsphere agents runtime environments

Project description

agent-sphere-python-sdk

说明

agent-sphere 是一个云端安全隔离的沙箱基础设施,提供安全的环境来运行 AI 生成的代码。

agent-sphere-python-sdk 是用于连接和操作 agent-sphere 沙箱的 Python SDK,提供了启动沙箱、控制沙箱状态、执行代码、文件操作等功能。

开发

环境搭建

本项目使用 Poetry 进行依赖管理,虚拟环境将创建在项目目录内(.venv 文件夹)。

前置要求

创建虚拟环境并安装依赖

# 1. 克隆项目后,进入项目根目录
cd agent-sphere-python-sdk

# 2. 创建虚拟环境并安装所有依赖(包括开发依赖)
poetry install

# 3. 配置 IDE 解释器
# 虚拟环境创建完成后,需要在 IDE 中选择正确的 Python 解释器
# 解释器路径指向到:项目根目录/.venv/bin/python 

分发

安装(用户安装SDK的方法)

  pip install agentsphere

SDK维护和发布

本地测试

  # 在项目根目录(包含 pyproject.toml 的目录)执行:
  pip install -e .

测试发布

pip install ./dist/*

正式发布

# 1. 构建包(自动包含所有optional-dependencies)
python -m build

# 2. 检查包内容
unzip -l dist/agentsphere-1.0.0-py3-none-any.whl | grep METADATA
# 应显示所有可选依赖组(包括dev)

# 3. 上传到PyPI
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=pypi-your-api-token
twine upload dist/*

本地团队测试

# 启动本地 PyPI 服务器
python -m pip install pypiserver
mkdir ~/packages
pypi-server run -p 8080 ~/packages &

# 上传测试包
twine upload --repository-url http://localhost:8080 dist/*

# 从本地安装测试
pip install --index-url http://localhost:8080/simple/ agentsphere

版本号修改

每次上传需要使用新的版本号

版本号文件:pyproject.toml

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

agentsphere-0.1.3.tar.gz (61.0 kB view details)

Uploaded Source

Built Distribution

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

agentsphere-0.1.3-py3-none-any.whl (117.4 kB view details)

Uploaded Python 3

File details

Details for the file agentsphere-0.1.3.tar.gz.

File metadata

  • Download URL: agentsphere-0.1.3.tar.gz
  • Upload date:
  • Size: 61.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for agentsphere-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1dbfa4ab6399ebf9655c6b2c51ceb7fa34b66f961c99929f5c5ffcb4337c8f8c
MD5 f945eb808637c84cc30daaca597e0fb4
BLAKE2b-256 a64b3c349ba46e6dc4a6e2bd2297bb8a66b181651b589e326392d3e1aaf54c59

See more details on using hashes here.

File details

Details for the file agentsphere-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: agentsphere-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 117.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for agentsphere-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 71a09bf2a22968b5c097a86b1ad15076af1a8c147b64c5f36cd6d28ccc3e8b19
MD5 772e0ad5170ace9d8275e4fc37c5d641
BLAKE2b-256 4e5a2e2e88a5d7830ebcd1aa42db98e595a73a8e9863b755e5ccec88733c6af8

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