wechatpy
WeChat SDK for Python
What it is and what it does
wechatpy is a Python SDK that wraps WeChat's official APIs, enabling developers to build integrations with WeChat's ecosystem. It covers passive message handling and active API calls for public accounts, enterprise WeChat, payment processing, third-party platform delegation, and mini-program cloud development. The package depends on six, requests, xmltodict, optionaldict, python-dateutil, and enum34 to handle HTTP communication, XML parsing, and date manipulation.
The SDK is production-stable and widely used, with an active repository and a permissive MIT license. However, there is a notable gap between the latest PyPI release (November 2021) and recent repository commits (May 2026), which may indicate either that the package is stable enough not to require frequent releases or that the published version lags behind development.
Use it for:
- Build a WeChat public account bot that receives and responds to user messages passively.
- Integrate WeChat payment processing into a Python application.
- Implement enterprise WeChat workflows and API calls.
- Develop a mini-program backend using WeChat's cloud development APIs.
- Act as a third-party platform to manage multiple WeChat public accounts.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
WeChat SDK providing Python bindings for WeChat's public platform, enterprise, payment, mini-program, and third-party APIs.
Yes, if you are building a WeChat integration in Python. The package is production-stable and carries no known vulnerabilities. The main caveat is the gap between the published version (November 2021) and repository activity (May 2026)—verify that the current release supports your target WeChat APIs and Python version before committing to production.
Install
wechatpy on PyPI
pip
pip install wechatpyuv
uv add wechatpypoetry
poetry add wechatpyInstalling wechatpy
Before you install
Low friction installation with six runtime dependencies. Actively maintained as of May 2026 with 4297 GitHub stars and consistent commit history, though the latest PyPI release dates to November 2021.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for production WeChat integrations.
Quickstart
pip install wechatpy
from wechatpy import parse_message, create_reply
# Parse incoming WeChat message
msg = parse_message(xml_data)
# Create and return a text reply
reply = create_reply('Hello', msg)
Verify before relying
- Whether the November 2021 PyPI release reflects the actual current codebase given May 2026 repository activity.
- Compatibility with modern Python 3.x versions beyond 3.7 listed in classifiers.
- Support status for WeChat API changes since the last release.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — six, requests, xmltodict, optionaldict, python-dateutil, enum34 |
| Maintenance | actively maintained — 1,737 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 153,701/month — #10,872 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: wechatpy-1.8.18-py2.py3-none-any.whl
Keywords: WeChat, weixin, SDK
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
pywxdumpExtracts WeChat account metadata, decrypts chat…
permissive · top 15,000 on PyPI
wechatpayv3SDK for integrating WeChat Pay API v3 into…
permissive · top 5,000 on PyPI
wecom-aibot-python-sdkA Python SDK for WeChat Work (企业微信) AI bot that…
permissive · top 15,000 on PyPI
webexteamssdkPython SDK for the Webex APIs that handles…
permissive · top 15,000 on PyPI
qq-botpyA Python framework for building QQ chat bots…
permissive · top 15,000 on PyPI
smartapi-pythonA Python client library for Angel Broking's…
unclear · top 15,000 on PyPI
chargehoundChargehound provides Python bindings to…
permissive · top 15,000 on PyPI
ringcentralPython SDK for accessing RingCentral's cloud…
unclear · top 15,000 on PyPI
razorpayPython client library for the Razorpay payment…
permissive · top 5,000 on PyPI
tinytuyaControls and monitors Tuya WiFi smart devices…
permissive · top 15,000 on PyPI