Metadata-Version: 2.1
Name: otl
Version: 0.0.1
Summary: A small example package
Home-page: https://github.com/
Author: waqu
Author-email: author@example.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE

# **otl 工具集**
---
### 封装企业微信接口
```python
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)
```

