All Projects → menduo → kdniao_python

menduo / kdniao_python

Licence: other
快递鸟 kdniao python sdk, with tornado async & asyncio http client support.

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to kdniao python

Pychat
webchat via WebSockets/WebRTC that allows messaging/video call/screen sharing
Stars: ✭ 152 (+508%)
Mutual labels:  tornado
Elasticsearch Test Data
Generate and upload test data to Elasticsearch for performance and load testing
Stars: ✭ 194 (+676%)
Mutual labels:  tornado
Fpage
Tornado project generator. Start a project with tornado, mako/jinjia2 and sqlalchemy/peewee in a minute.
Stars: ✭ 242 (+868%)
Mutual labels:  tornado
Flask Easy Template
A template web app with Flask. Features: latest bootstrap, user registry, login, forgot password. Secured admin panel, pagination, config files for Nginx and Supervisor and much more.
Stars: ✭ 154 (+516%)
Mutual labels:  tornado
Webhookit
Simple git webhook cli tool for automation tasks, bind git webhook to action.
Stars: ✭ 177 (+608%)
Mutual labels:  tornado
Arsenic
Async WebDriver implementation for asyncio and asyncio-compatible frameworks
Stars: ✭ 209 (+736%)
Mutual labels:  tornado
App Turbo
A framework based on tornado for easier development, scaling up and maintenance
Stars: ✭ 131 (+424%)
Mutual labels:  tornado
tornado-upload
File Upload Application for Tornado
Stars: ✭ 41 (+64%)
Mutual labels:  tornado
Hrshell
HRShell is an HTTPS/HTTP reverse shell built with flask. It is an advanced C2 server with many features & capabilities.
Stars: ✭ 193 (+672%)
Mutual labels:  tornado
Gidgethub
An async GitHub API library for Python
Stars: ✭ 226 (+804%)
Mutual labels:  tornado
Webssh
🌱 Web based ssh client
Stars: ✭ 2,520 (+9980%)
Mutual labels:  tornado
Dnsmasqweb
基于DNSmasq的DNS解析、以及DHCP地址分配系统
Stars: ✭ 166 (+564%)
Mutual labels:  tornado
Collipa
The source code of Collipa
Stars: ✭ 217 (+768%)
Mutual labels:  tornado
Fp Server
Free proxy server, continuously crawling and providing proxies, based on Tornado and Scrapy. 免费代理服务器,基于Tornado和Scrapy,在本地搭建属于自己的代理池
Stars: ✭ 154 (+516%)
Mutual labels:  tornado
Opendevops
CODO是一款为用户提供企业多混合云、一站式DevOps、自动化运维、完全开源的云管理平台、自动化运维平台
Stars: ✭ 2,990 (+11860%)
Mutual labels:  tornado
Tornado Zh
中文版 Tornado 文档【WIP】
Stars: ✭ 148 (+492%)
Mutual labels:  tornado
Torcms
Flexible, extensible web CMS framework built on Tornado.
Stars: ✭ 197 (+688%)
Mutual labels:  tornado
mypy-playground
The mypy playground. Try mypy with your web browser.
Stars: ✭ 58 (+132%)
Mutual labels:  tornado
pait
Python Modern API Tools, fast to code
Stars: ✭ 24 (-4%)
Mutual labels:  tornado
Pypress Tornado
pypress rework by tornado
Stars: ✭ 226 (+804%)
Mutual labels:  tornado

kdniao_python

快递鸟 kdniao python sdk, with tornado async http client support.

version: 0.1.2

非官方。无利益关系。

Screenshot(terminal)

TODO

  • doc, more doc
  • test, more test

Support API 支持的快递鸟 API

所有 API 见 http://www.kdniao.com/api-all,快递鸟可能会随时推出新的 API。

Install 安装

pip install -u kdniao

Usage 使用

依赖

无论是在程序上,还是在命令行中,你都必须先获得快递鸟官方分配给你的 app id 及 app key。可在 http://www.kdniao.com/reg 注册获取。

在命令行运行 kdniao 命令时,需要在命令行参数中指定 id 与key,或者预先在环境变量中指定 KDNIAO_APP_IDKDNIAO_APP_KEY。如:

  1. KDNIAO_APP_ID={你的ID} KDNIAO_APP_KEY={你的Key} kdniao {运单号},或:
  2. ~/.bash_profile 中设置变量,并重新打开 shell 执行: kdniao {运单号},或:
  3. kdniao {运单号} --ik={APP_ID},{APP_KEY}

Command Line 命令行

$ kdniao {运单号} --s=快递公司编码 --o=订单号 --ik={APP_ID},{APP_KEY}

# 如:
# $ kdniao 12345678 --s YTO
# $ kdniao 12345678 --ik={APP_ID},{APP_KEY}

Sync 同步客户端

from kdniao.client import KdNiaoClient
app_id = 12345678
app_key = "YOUR_APP_KEY"
is_prod = True

logistic_code, shipper_code, order_code = 12345678, "SF", ""

client = KdNiaoClient(app_id, app_key, is_prod)
trace_res = client.api_track.track(logistic_code, shipper_code, order_code, timeout=(10, 10))

# Your logic code here

Tornado Async Client 异步客户端

from kdniao.client import KdNiaoAsyncClient
app_id = 12345678
app_key = "YOUR_APP_KEY"
is_prod = True

logistic_code, shipper_code, order_code = 12345678, "SF", ""

async_client = KdNiaoAsyncClient(app_id, app_key, is_prod)
trace_res = yield async_client.api_track.track(logistic_code, shipper_code, order_code, timeout=(10, 10))

# Your logic code here

贡献

欢迎 start、fork 并贡献代码。也欢迎讨论交流、指正。

免责声明

  1. 快递鸟官方 可能会随时推出新的 API,kdniao_python 未必会及时支持。
  2. 快递鸟官方 可能会随时变动 API 协议,包括 API 网址、参数、签名算法等。

相关链接

联系

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].