Metadata-Version: 2.1
Name: pywework
Version: 1.1.5
Summary: A simple handy tool for wework text msg sending
Home-page: UNKNOWN
Author: dev
Author-email: dev@7758258.xyz
License: UNKNOWN
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <3.7
Description-Content-Type: text/markdown
Requires-Dist: requests

# pywework

##### Handy tool for text message sending in Wechat Work

![](https://wwcdn.weixin.qq.com/node/wwnl/wwnl/style/images/independent/index/logo_2x_en%24e1a5eab0.png)

Package pywework is a handy tool for text message in [Wechat Work](https://work.weixin.qq.com/) which is compatible with python2.7+ and python3.6+.



## User Guild

#### Configuration file: /etc/wework/wework.cfg

```python
{
    "corpid": "",
    "app":
    {
        "appname":{
            "agentid": "",
            "secret": "",
            "chatid": "",
            "robot": "robotname"
        }
    },
    "party":
    {
        "default": "2"
    },
    "robot": {
        "robotname": "robot hook key"
    },
    "user":
    [
        "dev"
    ]
}
```



Code talks

```python
from pywework import WeApp


with WeApp("appname") as app:
    app.send_app_msg("Hello world")
    app.send_app_msg("Hello world", touser="username")
    app.send_app_msg("Hello world", touser=["username"])
    app.send_roon_msg("Helo world")
    app.send_room_msg("Hello world", touser="username")
    app.send_room_msg("Hello world", touser=["username", "userphone"])

```

