Skip to main content

云枢开放平台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

Metadata

Release files for open-sdk-py 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for open-sdk-py 2.2.0
File Size Uploaded Provenance Actions
open_sdk_py-2.2.0.tar.gz 8.2 kB Without provenance Details for open_sdk_py-2.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for open-sdk-py 2.2.0
File Interpreter ABI Platform Actions
open_sdk_py-2.2.0-py3-none-any.whl Python 3 none any Details for open_sdk_py-2.2.0-py3-none-any.whl

Total release size: 17.2 kB

Release files / open_sdk_py-2.2.0.tar.gz

Download URL open_sdk_py-2.2.0.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
29aacab3efdc21f20e3f0e8eab1cfa84d312caeedc9921f1808cf73766a154c6
BLAKE2b-256 checksum
How to use checksums
dd8383bd358202053dddf0b0d5fbbbb373cc4a1668b51010972087c8adb4248a
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / open_sdk_py-2.2.0-py3-none-any.whl

Download URL open_sdk_py-2.2.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
322381cb71fbd53d2099b49b7ecb1fb18c6dcb96f95b388bb347916fa4f7171f
BLAKE2b-256 checksum
How to use checksums
1653d7653a13570defb78bfe482a999bf9a3988e32d9f9e21e122c23e2ea5caf
Upload date
Uploaded using Trusted Publishing?
What is 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}

Security for open-sdk-py 2.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page