Coder Social home page Coder Social logo

wxpusher / wxpusher-sdk-python Goto Github PK

View Code? Open in Web Editor NEW
213.0 7.0 41.0 15 KB

微信消息实时推送服务[WxPusher]的Python版本sdk,可以通过API实时给个人微信推送消息。wechat pusher.

Home Page: http://wxpusher.zjiecode.com/demo

License: Apache License 2.0

Makefile 7.37% Python 92.63%
wxpusher wechat weixin notification push-notification python python3 python-sdk

wxpusher-sdk-python's Introduction

WxPusher

PyPI version PyPI license Python Versions Downloads

WxPusher Python SDK.

其他语言版本: English, 简体中文.

入门指南

安装

pip install -U wxpusher

使用

from wxpusher import WxPusher
WxPusher.send_message('<content>',
                      uids=['<uids>'],
                      topic_ids=['<topic_ids>'],
                      token='<appToken>')
WxPusher.query_message('<messageId>')
WxPusher.create_qrcode('<extra>', '<validTime>', '<appToken>')
WxPusher.query_user('<page>', '<page_size>', '<appToken>')

运行测试

配置

运行测试需要配置好 appTokenuids

首先,将 wxpusher/tests/ 文件夹下的配置样例 config.sample.py 复制并命名为 config.py

cd wxpusher/tests
cp config.sample.py config.py

然后,填写 config.py 中的相应信息。

启动测试

配置好后就可以使用 tox 来运行测试了。

tox

或者直接使用 nose 也可以

nosetests

TODO

  • 基本架构并上传到 PyPI
  • 发送消息.
  • 查询消息.
  • 创建二维码.
  • 查询用户.
  • 更完备的客户端验证.
  • 命令行脚本.
  • 更完善的文档.
  • 更完备的单元测试.

贡献

  • 通过 Github Issues 提交评论或建议。
  • 直接提交 Pull Requests 必须没问题。

wxpusher-sdk-python's People

Contributors

grayxu avatar huxuan avatar mapicccy avatar psc-f avatar zjiecode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

wxpusher-sdk-python's Issues

调用方法中参数类型需要调整

readme 中调用wxpusher的用法是:
WxPusher.send_message('',
uids='',
topic_ids='<topic_ids>',
token='')
其中uids 和 topic_ids 不是字符串类型,是列表类型,以字符串形式调用会返回1005错误。使用以下调用方式提交发送消息成功:
WxPusher.send_message('test1111',
uids=['UID_xxxxxxx'],
topic_ids=[],
token='AT_xxxx')
建议存储发送任务的返回消息,即
result = WxPusher.send_message('test1111',
uids=['UID_xxxxxxx'],
topic_ids=[],
token='AT_xxxx')
print(result)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.