- 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
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客户端监控页面