Skip to main content

A simple WeChat client written in Python.

Project description


A simple WeChat client is based on Web HTTP api, supporting authorization, login, fetching message and sending message.

Here we go:

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


  • 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.


We can simply use pip to install, as the following:

$ pip install pywxclient

or installing from git

$ pip install git+


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.


Go to

How to Contribute

Open an issue, join a discussion or make a pull request.

Project details

Download files

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

Files for pywxclient, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size pywxclient-0.1.2-py3-none-any.whl (20.2 kB) File type Wheel Python version py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page