V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
0x5010
V2EX  ›  Python

阿里大于 python sdk 完善

  •  
  •   0x5010 · 2016-10-25 18:23:24 +08:00 · 3127 次点击
    这是一个创建于 2733 天前的主题,其中的信息可能已经有所发展或是发生改变。

    https://github.com/0x5010/alidayu

    原 sdk 不兼容 python3 各种引用方式也不太友好,修改了个兼容的版本。 简单的测试了下,大家有用的小伙伴可以用看看,有什么 bug 或问题 github 上直接提 issue ,会尽快解决的!

    测试代码

    # -*- coding: utf-8 -*-
    __editor__ = 0x5010
    
    from alidayu import api, appinfo
    
    appkey = "appkey"
    secret = "secret"
    req = api.AlibabaAliqinFcSmsNumSendRequest()
    req.set_app_info(appinfo(appkey, secret))
    
    req.sms_type = "normal"
    req.rec_num = "手机号"
    req.sms_template_code = "模板代码"
    req.sms_free_sign_name = "验证名字"
    req.sms_param = {"code": "模板代码和内容"}
    resp = req.getResponse()
    print(resp)
    
    3 条回复    2016-10-26 20:44:07 +08:00
    cnlongxi
        1
    cnlongxi  
       2016-10-25 22:41:38 +08:00 via iPhone
    前几天也在改兼容性,看了官方的 sdk 比较乱,没改,最终换成了 php 的了
    0x5010
        2
    0x5010  
    OP
       2016-10-26 09:38:42 +08:00   ❤️ 1
    @cnlongxi 官方的 sdk 应该不是写 python 的写的 应该是其他语言的会 python 写的 代码风格不像 python ,但是结构不错。
    我整理好了。要得话直接用就好了,有 bug 提出来
    cnlongxi
        3
    cnlongxi  
       2016-10-26 20:44:07 +08:00 via iPhone
    @0x5010 好的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1455 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 17:19 · PVG 01:19 · LAX 10:19 · JFK 13:19
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.