苏宁开放平台Python-SDK,beta版
参考了淘宝sdk的设计结构。
关于平台地址以及appkey和appsecret等的配置可以修改suning.api.config.py 文件
使用方法见test包中的test.py等测试代码
以上是原版suning-sdk-python的README.md,苏宁的python sdk支持python2.7及以上
原版下载地址:SDK下载
此轮子地址:项目地址
创建轮子的原因:
由于自己的其他项目需要,觉得建一个轮子的方式比丢进自己的代码里更好,然而pip里竟然没有!所以建了这个轮子。
关于包的安装:
pip install suning-sdk
或
pip3 install suning-sdk
关于包的引用及示例
我们以调用suning.netalliance.recommendcommodity.query为例
import suning.api as api
try:
client = api.RecommendcommodityQueryRequest()
client.setDomainInfo("openpre.cnsuning.com", "80")
client.setAppInfo('你申请到的appKey', '你申请到的secretKey')
client.couponMark = '1'
resp = client.getResponse()
except Exception as e:
print(e)
更多示例请参考官方的SDK下的test目录或直接查看:https://github.com/why2ly/suning-sdk/test
接口的具体说明请查看:苏宁开放平台API文档
关于更新:
如果版本落后苏宁官网,请主动前往:项目github提issue或PR
没issue或PR就不更新了
关于版本
| 版本号 | 苏宁官方sdk下载日期 |
|---|---|
| 1.0.0 | 2020-07-15 |
Metadata
Release files for suning-sdk 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| suning-sdk-1.0.0.tar.gz | 119.8 kB | Without provenance | Details for suning-sdk-1.0.0.tar.gz |
Release files / suning-sdk-1.0.0.tar.gz
| Download URL | suning-sdk-1.0.0.tar.gz |
|---|---|
| Size | 119.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0393e8adcbd62b5084fe061efea2ef6c4bbb4573bc576865982fdbc8e8921485
|
|
BLAKE2b-256 checksum How to use checksums |
50bd13739a9ab1799e87fd399c9e347667a8b570ceeeb9697333fe622dd9016e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/36.4.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/2.7.5
|
Security for suning-sdk 1.0.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.