Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

Yunpian Python SDK

Project Description

云片 SDK

快速开始

  • 安装SDK

    pip install yunpian-python-sdk
    

    : master是最新稳定版,发布版本见PyPI

  • 使用YunpianClient

    from yunpian_python_sdk.model import constant as YC
    from yunpian_python_sdk.ypclient import YunpianClient
    # 初始化client,apikey作为所有请求的默认值
    param = {YC.MOBILE:'18616020\*\*\*',YC.TEXT:'【云片网】您的验证码是1234'}
    r = clnt.sms().single_send(param)
    # 获取返回结果, 返回码:r.code(),返回码描述:r.msg(),API结果:r.data(),其他说明:r.detail(),调用异常:r.exception()
    # 短信:clnt.sms() 账户:clnt.user() 签名:clnt.sign() 模版:clnt.tpl() 语音:clnt.voice() 流量:clnt.flow()
    

``` : v1.0.0不兼容之前版本0.0.8

配置说明 (默认配置就行)

  • 默认配置文件 yunpian_python_sdk/yunpian.ini
  • 构造器配置
    • YunpianClient('apikey')
    • YunpianClient('apikey',conf), conf字典key详见model.constant.YP_*
  • apikey的优先级:接口的param[APIKEY] > 构造器的apikey > 构造器的conf[YP_APIKEY]

源码说明

  • 接口默认使用v2版本,可以在调用时指定版本,如clnt.sms().version('v1').single_send(param)
  • API单元测试目录tests,支持tox.ini
  • 分支说明: master是最新发布版本,develop是待发布的分支(开源贡献可以pull request到develop分支)

联系我们

云片支持 QQ

SDK开源QQ群

文档链接

Release History

Release History

This version
History Node

1.0.1

History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
yunpian_python_sdk-1.0.1-py2.py3-none-any.whl (28.0 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Jul 11, 2017
yunpian-python-sdk-1.0.1.tar.gz (62.2 kB) Copy SHA256 Checksum SHA256 Source Jul 11, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting