Skip to main content

Actions Status

快递鸟 Python SDK

requirements

python >= 3.6

基于快递鸟v5.41开发

已实现接口列表

下单类(Order)

  • 上门取件 order
  • 预约取件 preorder
  • 电子面单 eorder

查询类(Query)

  • 获取即时物流轨迹 get_express_routes
  • 接口订阅轨迹 subscribe_express_routes

增值接口类 (Service)

  • 单号识别 recognize_logistic_code
  • 智能地址解析 parse_address

安装

pip install kdn

使用

from kdn.api.kdn import KDN

kdn = KDN(client_id, api_key)
kdn.query.get_express_routes("SF", "1234561", "111")

智能地址解析

from kdn.api.kdn import KDN

kdn = KDN(client_id, api_key, timeout=15)
result = kdn.service.parse_address(
    "深圳市龙岗区坂田街道长坑路西2巷2号202 黄大大 18273778575"
)

parse_address 固定使用快递鸟 HTTPS 正式接口。SDK 默认请求超时为 15 秒, 也可通过 KDN(..., timeout=30) 或 parse_address(content, timeout=30) 覆盖。

Metadata

Release files for kdn-sdk 0.2.9

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

Source distribution (sdist)

Source distribution for kdn-sdk 0.2.9
File Size Uploaded
kdn_sdk-0.2.9.tar.gz 23.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kdn-sdk 0.2.9
File Interpreter ABI Platform
kdn_sdk-0.2.9-py3-none-any.whl Python 3 none any Details

Total release size: 54.6 kB

Release files / kdn_sdk-0.2.9.tar.gz

Download URL kdn_sdk-0.2.9.tar.gz
Size 23.5 kB
Tags Source
SHA-256 checksum
How to use checksums
41aab5084b315319ce48b90e4752d5281c4c0795cedcba0673ba0f5e14034f7a
BLAKE2b-256 checksum
How to use checksums
6a4c5c11476973be17735c8a354a345764c043a702b0fd5a814e98aa21ee75f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.4

Release files / kdn_sdk-0.2.9-py3-none-any.whl

Download URL kdn_sdk-0.2.9-py3-none-any.whl
Size 31.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9cb977513e6573411491b848a7d382481fdaf1df6614b0906b9d7ca9d775c3b4
BLAKE2b-256 checksum
How to use checksums
f7e873b7ce727b5fdc07a69a9a05e35121d00b4b4ad024476a142326198534f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.2.9 This release

2 release files

0.2.8

1 release file

0.2.7

1 release file

0.2.6

1 release file

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