云枢开放服务平台集成SDK工具(Python版)
Project description
云枢开放平台Python版工具使用
调用云枢开放平台接口集成工具,支持RSA数据加密,请求业务接口可集成到客户端系统中
1. 安装与使用
Python 版本要求:>=3.11
# pip 安装
pip install open-sdk-py
# uv 安装
uv add open-sdk-py
2. 使用
from open_sdk_py import OpenPlatformClient
# 建立请求云枢客户端
client = OpenPlatformClient.create(
app_key="企业端key值",
app_secret="企业端secret值",
request_url="企业申请能力接口,通过后可在申请详情获取接口地址",
request_data=data, # 请求数据,推荐dict格式或json格式
headers={}, # 【若有】dict类型,包含请求头键值对
)
# 发送请求
result = client.send() # type为dict类型
也可以采用链式构建客户端:
client = OpenPlatformClient.create(
app_key="企业端key值",
app_secret="企业端secret值",
request_url="企业申请能力接口,通过后可在申请详情获取接口地址",
).set_request_data({}).set_headers({})
result = client.send()
3. 错误码
| 错误编码 | 错误信息(含义) |
|---|---|
| M0411 | app_key、app_secret和request_url是必填参数,不能为空 |
| M0429 | 请求次数过多,请稍后重试 |
| M0430 | 不支持的请求类型 |
| M0500 | 系统繁忙,请稍后重试 |
| M0555 | 参数校验失败 |
| M0511 | 三方服务调用失败 |
| M0512 | 获取接口信息失败 |
| M0513 | 响应信息转换失败 |
| M0514 | 接口请求参数不能为空 |
| M0515 | 接口请求头不能为空 |
| REQUEST_TIMEOUT | 请求超时 |
| CONNECTION_ERROR | 网络连接失败 |
| HTTP_{code} | HTTP 状态码异常(如 HTTP_403、HTTP_502) |
| PARSE_ERROR | 响应 JSON 解析失败 |
补充
云枢开放平台地址:https://open.yljr.com
问题反馈联系方式:open-api@yljr.com
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
open_sdk_py-2.2.0.tar.gz
(8.2 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 open_sdk_py-2.2.0.tar.gz.
File metadata
- Download URL: open_sdk_py-2.2.0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29aacab3efdc21f20e3f0e8eab1cfa84d312caeedc9921f1808cf73766a154c6
|
|
| MD5 |
6ba2e1960c5a60a34b5e9757add0ef21
|
|
| BLAKE2b-256 |
dd8383bd358202053dddf0b0d5fbbbb373cc4a1668b51010972087c8adb4248a
|
File details
Details for the file open_sdk_py-2.2.0-py3-none-any.whl.
File metadata
- Download URL: open_sdk_py-2.2.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
322381cb71fbd53d2099b49b7ecb1fb18c6dcb96f95b388bb347916fa4f7171f
|
|
| MD5 |
16d1a62d9321ea5a933e5f6e36ed6459
|
|
| BLAKE2b-256 |
1653d7653a13570defb78bfe482a999bf9a3988e32d9f9e21e122c23e2ea5caf
|