Robot Client for QiYe Wechat
Project description
Robot Client for QiYe Wechat
Installation
python3 -m pip install wx-robot-client
Usage
Usage in CMD
wx_robot -h
# method 1: use -k option
wx_robot -k YOUR_ROBOT_KEY 'hello world'
# method 2: use env variable
WX_ROBOT_KEY=YOUR_ROBOT_KEY wx_robot 'hello world'
# method 3: use .env [recommend]
echo "WX_ROBOT_KEY=YOUR_ROBOT_KEY" > .env
wx_robot 'hello world'
# --------------------------------------------------
# send markdown
wx_robot -t markdown '# hello world'
# send image
wx_robot -t image test.png
# send file
wx_robot -t file README.md
# send news
wx_robot -t news '[{"title": "Hello, World!", "description": "...", "url": "https://www.example.com", "picurl": "xxx"}]'
# --------------------------------------------------
# send message from file
wx_robot requirement.txt
wx_robot -t markdown README.md
wx_robot -t news news.json
wx_robot -t template_card template_card.json
Usage in Python
from wx_robot.core import Robot
robot = Robot()
robot.send_text('Hello, World!')
robot.send_markdown('# Hello, World!')
robot.send_image('test.png')
robot.send_file('README.md')
robot.send_news([{
'title': 'Hello, World!',
'description': 'This is a test news.',
'url': 'https://www.example.com',
'picurl': 'https://www.example.com/demo.png',
}])
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
wx_robot_client-1.0.0.tar.gz
(5.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wx_robot_client-1.0.0.tar.gz.
File metadata
- Download URL: wx_robot_client-1.0.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8fbfecc1773d1e06db7abdd8b49bd57ed5677661bd6a89d8228fd7975306397
|
|
| MD5 |
79c20939b84c83f536db01407745a967
|
|
| BLAKE2b-256 |
7e18f999693381a18635762e52b54d51ccc6ff55145756009fc35a40a43357b0
|
File details
Details for the file wx_robot_client-1.0.0-py3-none-any.whl.
File metadata
- Download URL: wx_robot_client-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
789d85662b5753db387b0eff0307028af8837c6b0d21c1bc8c854fcc00e68333
|
|
| MD5 |
86c3fe38ce63e4b8351dd5a265b1c3b3
|
|
| BLAKE2b-256 |
66f89855ea2ec11881d1f71e950ebc31d6271df1d828a06751bfa2048368a070
|