优雅的RCK (Relational Calculate Kernel) Python SDK
Project description
RCK Python SDK
一个优雅的Python SDK,用于访问RCK (Relational Calculate Kernel) API服务。
🌟 主要功能
- 文本计算和分析: 强大的自然语言处理能力
- 图像生成和渲染: 多样化的艺术风格图像生成
- 多模态资源处理: 支持文本、图像等多种输入
- 自定义输出格式: 灵活的JSON Schema输出定义
- 简洁易用: 直观的API设计,快速上手
📦 安装
从PyPI安装(推荐)
pip install rck-python-sdk
从源码安装
git clone https://github.com/rck/rck-python-sdk.git
cd rck-python-sdk
pip install -e .
🚀 快速开始
基础使用
from rck_sdk import RCKClient
# 初始化客户端
client = RCKClient(api_key="your-api-key")
# 文本分析
result = client.compute.analyze(
text="床前明月光,疑是地上霜",
task="分析诗歌的情感和主题"
)
print(result.data)
# 图像生成
image = client.image.generate(
prompt="山水画风格的风景",
composition="远山近水的构图",
lighting="柔和的晨光",
style="中国传统水墨画风格"
)
# 保存图像
if image.success:
saved_files = client.image.save_images(image, "landscape")
print(f"图像已保存: {saved_files}")
高级功能
# 自定义输出格式
custom_schema = {
"type": "object",
"properties": {
"emotion": {"type": "string"},
"theme": {"type": "string"},
"analysis": {"type": "string"}
}
}
result = client.compute.custom_compute(
text="春眠不觉晓,处处闻啼鸟",
task="深度分析诗歌",
output_schema=custom_schema
)
# 多模态创作
resources = [
{"image_1": "https://example.com/image1.jpg"}
]
poem = client.compute.create_poem(
inspiration="基于图片的意境创作",
style="五言绝句",
resources=resources
)
📖 文档
🤝 贡献
欢迎提交Issue和Pull Request!
📄 许可证
本项目采用MIT许可证 - 查看 LICENSE 文件了解详情。
🆘 支持
如有问题,请通过以下方式联系我们:
- 邮箱: support@rck.ai
- GitHub Issues: 提交问题
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
rck_python_sdk-1.0.0.tar.gz
(16.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 rck_python_sdk-1.0.0.tar.gz.
File metadata
- Download URL: rck_python_sdk-1.0.0.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
844e87d05af33200a01578f8b272b8837218d9cccf26fe0488652bc7f7e6f73e
|
|
| MD5 |
d9415aaf35f87cbb55f7e8226905f4a1
|
|
| BLAKE2b-256 |
94c16499f8dc6260eb4cdb4e9d73c3182edbb4e18f57c85526a05e03b5871e2f
|
File details
Details for the file rck_python_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: rck_python_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
064ff37dcff74f5a0fe576d28f7ed6ad2a98609edb33f6e63202f8ada78f985d
|
|
| MD5 |
c91f7d9cb4412b7a8c89af5eb09b1a10
|
|
| BLAKE2b-256 |
d3a50aa78ccaee36a3ae90f0452a7ab1ff2c2d5c707d3755aaf3b67f620feac4
|