顺丰国际 Python SDK
基于顺丰国际官网开放平台1.0 API开发的Python SDK
版本:1.0.0.1
功能概述
目前已经开发完成的接口列表:
安装
pip install sf-inter-sdk
使用示例
clientcode和checkword是在顺丰官网注册后得到的用户编码和校验码
from sf.api import SF
sf = SF("clientcode","checkword")
sf.order.create_order(clientid,..)
下单
contacts = []
sender = ContactInfo("北京市昌平区回龙观天慧园",company="测试公司",mobile="18512345678")
receiver = ContactInfo("北京市海淀区新中关大厦A座",company="新东方",mobile="18511223344",contactType=1)
contacts.append(sender)
contacts.append(receiver)
cargo_detail = CargoDetail("测试货物")
res = self.sf.order.create_order(self.order_no, contacts,[cargo_detail])
订单查询
res = self.sf.order.get_order(self.order_no)
确认/取消订单
res = self.sf.order.confirm_order(self.order_no, dealType=2)
路由信息
res = self.sf.order.get_route_info(self.order_no)
判断是否可以派单
res = self.sf.order.can_delivery(self.order_no)
打印电子面单
res = self.sf.order.get_order(self.order_no)
documents = [
{
"masterWaybillNo": res['msgData']['waybillNoInfoList'][0]['waybillNo'],
}
]
res = self.sf.sheet.sync_print(f"fm_150_standard_QXH",documents)
Metadata
Release files for sf-international-sdk 0.0.3
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 |
|---|---|---|---|---|
| sf_international_sdk-0.0.3.tar.gz | 12.7 kB | Without provenance | Details for sf_international_sdk-0.0.3.tar.gz |
Release files / sf_international_sdk-0.0.3.tar.gz
| Download URL | sf_international_sdk-0.0.3.tar.gz |
|---|---|
| Size | 12.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad75ac6a459196c4eae73f12d229dd182d1d271c44cc6f31bdd68dd568d97135
|
|
BLAKE2b-256 checksum How to use checksums |
df422d66fc498a7225e009501410ccbddbf892779b61546706dcfc0920dbab12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.10.12
|
Security for sf-international-sdk 0.0.3
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.