Files
sino-mci/channel-service/README.md
marsal bd0ac464cf feat(channel-service): add Python FastAPI pywechat channel service
- Add FastAPI project under channel-service/
- Implement mock pywechat client adapter (login, send, heartbeat)
- Add /v1/wechat-personal/login/*, /v1/wechat-personal/send/* APIs
- Add /v1/heartbeat and /v1/monitor/status for client health
- Add /monitor HTML page with Web Components
- Add pytest suite and Dockerfile
- Update .gitignore for Python/Node artifacts
2026-07-07 12:36:54 +08:00

981 B

sino-mci-channel-service

Python 渠道服务,用于管理 pywechat 个人微信等渠道客户端。

当前状态

  • 使用 Mock pywechat 客户端进行开发联调;真实 Windows 环境需接入 pywechat/pywinauto 驱动微信 PC 客户端。
  • 提供登录二维码模拟、消息发送模拟、心跳上报、客户端监控页面。

本地运行

cd channel-service
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload

测试

pytest

接口

  • GET /health 健康检查
  • POST /v1/wechat-personal/login/start 开始登录
  • GET /v1/wechat-personal/login/{account_id}/status 查询登录状态
  • POST /v1/wechat-personal/login/{account_id}/confirm 模拟扫码确认
  • POST /v1/wechat-personal/send/text 发送文本消息
  • POST /v1/heartbeat 客户端心跳
  • GET /v1/monitor/status 查询所有客户端状态
  • GET /monitor 客户端监控页面