skillfed

wechatpy

WeChat SDK for Python

wechatpy v1.8.18 153.7K downloads/30d#10,872 on PyPI4,297
Permissive license Active released

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 wechatpy

uv

uv add wechatpy

poetry

poetry add wechatpy

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

Tags

wechat sdk pythonweixin api clientwechat payment integrationwechat public platformwechat enterprise apiwechat mini programwechat message handling
wechat-integrationpayment-processingmessaging-api

More Libraries packages