Skip to content

Latest commit

 

History

History
77 lines (54 loc) · 1.77 KB

README-en.md

File metadata and controls

77 lines (54 loc) · 1.77 KB

WxPusher

PyPI version PyPI license Python Versions Downloads

WxPusher Python SDK.

Read this in other languages: English, 简体中文.

Getting Started

Installation

pip install -U wxpusher

Usage

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>')

Running the tests

Setup configuration

Configuration is necessary since the tests depend on VALID appToken and uids.

Frist, copy the configuration sample config.sample.py under wxpusher/tests/ to config.py

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

Then, fill in the corresponding information in config.py.

Trigger the tests

With proper configuration, you can run the tests with tox

tox

or nose directly

nosetests

TODO

  • Basic structure with PyPI uploaded.
  • Send Message.
  • Query Message.
  • Create QRCode.
  • Query User.
  • More client validators.
  • Command line scripts.
  • Better documentation.
  • More robust unittest.

Contribution

  • Comments or suggestions via github issues.
  • Pull requests are welcome absolutely.