Skip to main content

云枢开放服务平台集成SDK工具(Python版)

Project description

云枢开放平台Python版工具使用

调用云枢开放平台接口集成工具,支持RSA数据加密,请求业务接口可集成到客户端系统中

1. 安装与使用

  1. 安装依赖
  • python版本要求:>=3.7.12
pip install 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_keyapp_secretrequest_url是必填参数,不能为空
M0429 请求次数过多,请稍后重试
M0430 不支持的请求类型
M0500 系统繁忙,请稍后重试
M0555 参数校验失败
M0511 三方服务调用失败
M0512 获取接口信息失败
M0513 响应信息转换失败
M0514 接口请求参数不能为空
M0515 接口请求头不能为空

补充


云枢开放平台地址:https://open.yljr.com

问题反馈联系方式:wantless_wty@163.com

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

open_sdk_py-2.1.1.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

open_sdk_py-2.1.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file open_sdk_py-2.1.1.tar.gz.

File metadata

  • Download URL: open_sdk_py-2.1.1.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for open_sdk_py-2.1.1.tar.gz
Algorithm Hash digest
SHA256 917e4653b3cb483d75038ec5ea0e47a23b7bd74950bf34bde37cd41d63afe05c
MD5 d0cb8ad4b4357ac092e9fcf33b7898fe
BLAKE2b-256 ee49495715a710fe90b847d750b86afd1edfb937456af74e7c16dc6c28a0a59c

See more details on using hashes here.

File details

Details for the file open_sdk_py-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: open_sdk_py-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for open_sdk_py-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 002ca19ce8e97af97cc26bc1f52153b067559a93da9b06bf9b82f6bd6ecaac62
MD5 9edb0d8410647ec8853d767d2b491ddd
BLAKE2b-256 24a1d7b4bc8487e685a73b41e64af5c3cee42a220acec91fa125855950ad1f49

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