https://github.com/justdoit0823/pywxclient
A simple WeChat client written in Python supports session persistence.
https://github.com/justdoit0823/pywxclient
pywxclient wechat-bot wechat-framework wechat-sdk
Last synced: 3 months ago
JSON representation
A simple WeChat client written in Python supports session persistence.
- Host: GitHub
- URL: https://github.com/justdoit0823/pywxclient
- Owner: justdoit0823
- License: apache-2.0
- Created: 2017-05-26T03:16:08.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-03-01T04:37:32.000Z (over 8 years ago)
- Last Synced: 2024-03-14T20:52:17.842Z (over 2 years ago)
- Topics: pywxclient, wechat-bot, wechat-framework, wechat-sdk
- Language: Python
- Homepage: http://pywxclient.readthedocs.io/en/latest/index.html
- Size: 56.6 KB
- Stars: 275
- Watchers: 31
- Forks: 51
- Open Issues: 4
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
pywxclient
==========
.. image:: https://travis-ci.org/justdoit0823/pywxclient.svg?branch=master
:target: https://travis-ci.org/justdoit0823/pywxclient
A simple WeChat client is based on Web HTTP api, supporting authorization, login, fetching message and sending message.
Here we go:
.. code-block:: pycon
>>> from pywxclient.core import Session, SyncClient
>>> s1 = Session()
>>> c1 = SyncClient(s1)
>>> c1.get_authorize_url() # Open the url in web browser
>>> c1.authorize() # Continue authorize when returning False
>>> c1.login()
>>> c1.sync_check()
>>> msgs = c1.sync_message() # Here are your wechat messages
>>> c1.flush_sync_key()
Features
========
* WeChat authorization
* WeChat login
* Fetching WeChat contacts
* Fetching all possible messages
* Send text message
* Send image message
* Send video message
* Send file message
* Dump client as a dict
* Load client from a dict
* Local or network files uploading
**pywxclient aims to only support Python 3, so there is no guarantee for Python 2.**
Installation
============
We can simply use pip to install, as the following:
.. code-block:: bash
$ pip install pywxclient
or installing from git
.. code-block:: bash
$ pip install git+https://github.com/justdoit0823/pywxclient
Examples
========
In the `examples `_ directory, there are two simple python wechat client program as tutorials.
Or you can write a more complex wechat client with this `pywxclient` package.
Documentation
===============
Now, the guys can visit website `pywxclient `_ or build documentation as html files on local machines.
.. code-block: bash
$ git clone https://github.com/justdoit0823/pywxclient
$ cd pywxclient
$ tox -e sphinx-doc
CHANGELOG
==========
Go to `CHANGELOG.md `_.
How to Contribute
=================
Open an `issue `_, join a discussion or make a pull request.