A small example package
Project description
otl 工具集
封装企业微信接口
from otl.wechat.wechat_api import WechatApi
GLOBAL_WECHAR_CONFIG = {
'NAME': 'xxx',
#企业的id,在管理端->"我的企业" 可以看到
'CORP_ID': '',
#应用列表 可以配置多个应用
'APP_LIST': {
'warning_robot': { #报警机器人
'APP_ID': '', #APPID
'APP_SECRET': '', #APP密钥
'switch': 'on', #是否开启
},
}
}
if __name__ == '__main__':
we = WechatApi(GLOBAL_WECHAR_CONFIG)
status, res = we.apps['warning_robot'].send(
msg_type='text',
to_users_list=['xxx'],
msg_string='xxx'
)
if not status:
print(res)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
otl-0.0.1.tar.gz
(6.5 kB
view hashes)
Built Distribution
otl-0.0.1-py3-none-any.whl
(7.1 kB
view hashes)