Metadata-Version: 2.4
Name: ppcloud
Version: 0.1.0
Summary: ProsperPower Cloud CLI & SDK —— 编程式调用 GPU 算力市场
Project-URL: Homepage, https://prosperpower.cloud
Project-URL: Documentation, https://prosperpower.cloud/developers
Author-email: ProsperPower <info@prosperpower.cloud>
License: MIT
Keywords: ai,cloud,compute,gpu,prosperpower
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# ppcloud

ProsperPower Cloud 官方 CLI 与 Python SDK —— 用几行代码/命令，编程式调用 GPU 算力市场。

## 安装

```bash
pip install ppcloud
```

## 认证

在 [控制台](https://prosperpower.cloud) 创建 API 密钥后，导出为环境变量：

```bash
export PP_API_KEY="pp_live_你的密钥"
```

## CLI 用法

```bash
# 搜索可用算力
ppcloud search offers --gpu "RTX 4090"

# 拉起一个实例
ppcloud create instance --gpu "RTX 4090" --image ppcloud/pytorch:latest

# 查看 / 列出实例
ppcloud show instance 12847
ppcloud show instances

# 销毁实例（停止计费）
ppcloud destroy instance 12847
```

## Python SDK

```python
from ppcloud import Client

client = Client()  # 读取 PP_API_KEY 环境变量
offers = client.search_offers(gpu="RTX 4090")
inst = client.create_instance(gpu="RTX 4090", image="ppcloud/pytorch:latest")
print(inst["id"])
client.destroy_instance(inst["id"])
```

## 配置

- `PP_API_KEY` —— 你的 API 密钥（必填）
- `PP_API_URL` —— 接口地址，默认 `https://prosperpower.cloud/api/v1`（本地联调可设为 `http://localhost:3000/api/v1`）

文档：https://prosperpower.cloud/developers
