mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-03 04:24:36 +00:00
* perf: reduce memory usage by ~200MB+ at startup
Two key optimizations:
1. Use importlib.util.find_spec() instead of __import__() in dependency
checking. find_spec() only locates modules without executing them,
avoiding loading all 36 dependencies (~222MB) into memory at startup.
2. Introduce shared aiohttp.ClientSession via httpclient module.
Previously, every HTTP request created a new ClientSession, which
creates a new TCPConnector and SSL context, loading system root
certificates each time (~270MB total allocations observed via memray).
Now all HTTP client code reuses shared sessions.
- satori.py and coze_server_api/client.py are left unchanged as they
create one session per adapter lifecycle (not per-request).
Profiling data (memray):
- Peak memory: 403MB
- SSL context creation: 270MB / 6.7M allocations (67% of total)
- Dependency import: 222MB (55% of peak)
- Expected reduction: 150-350MB at startup
* fix: remove unused aiohttp imports (ruff F401)
* style: ruff format
wechatpad-python
此项目时准备对接wechatpadpro 的pythonsdk
未完工接口
-
关于好友的接口
-
关于群管理的接口
-
关于下载的接口
-
关于用户的部分接口
-
关于消息的部分接口
-
关于支付的
-
关于朋友圈的
-
关于标签的
-
关于收藏的
-
暂时只写了一部分接口
已完工接口
- 获取普通token
- 登录二维码(只是返回数据,暂时还未打印二维码)
- 获取登录状态
- 唤醒登录
- 退出登录
- 获取用户信息
- 获取用户二维码
- 上传用户头像
- 获取设备信息
- 发送文本消息
- 发送图片消息
- 发送语音消息
- 发送app消息
- 发送emoji消息
- 发送名片消息
- 撤回消息