No project description provided
Project description
pymsy
安装
pip install pymsg
功能
class DingTalkRobot
因钉钉的自定义机器人存在限制:"每个机器人每分钟最多发送20条";为方便使用,该类实例会暂存不能发送的消息,并在适当的时候发送出去,且所有方法均是线程安全的
示例
>>> from pymsg import DingTalkRobot
>>> robot = DingTalkRobot('https://oapi.dingtalk.com/robot/send?access_token=***')
>>> robot.set_cache_size(30) # 设置缓存大小,默认:20
>>> robot.text(
... content='我就是我, @1825718**** 是不一样的烟火', # 消息内容
... at='1825718****', # 被@人的手机号, 可传多个
... at_all=False # @所有人,默认:False
... )
结果
详细功能请参考代码
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pymsg-0.1.2.tar.gz
(3.3 kB
view hashes)
Built Distribution
pymsg-0.1.2-py3-none-any.whl
(3.6 kB
view hashes)