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 text
wx_robot 'hello world'
# send text with mentioned_list
wx_robot 'hello world' -m user1 -m user2
wx_robot 'hello world' -m @all
# send text with metioned_mobile_list
wx_robot 'hello world' -M 13800138000 -M 13800138001
wx_robot 'hello world' -M @all
# 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_text('Hello, World!', mentioned_list=['user1', 'user2'])
robot.send_text('Hello, World!', mentioned_mobile_list=['13800138000', '13800138001'])
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',
}])
Metadata
Release files for wx-robot-client 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wx_robot_client-1.0.1.tar.gz | 6.4 kB | Without provenance | Details for wx_robot_client-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wx_robot_client-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for wx_robot_client-1.0.1-py3-none-any.whl |
Total release size: 13.1 kB
Release files / wx_robot_client-1.0.1.tar.gz
| Download URL | wx_robot_client-1.0.1.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b280c9bc0d4cd785977365904bfc44923fdeb936936351cb895be243100ed321
|
|
BLAKE2b-256 checksum How to use checksums |
336555e91d88ecab2982c3cad3994d9842491a50bff8ff96ef672efd1776d78f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.8
|
Release files / wx_robot_client-1.0.1-py3-none-any.whl
| Download URL | wx_robot_client-1.0.1-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40bf2a7db58dceea040b29bad4582d376b6904ad06693c14a369692871d37eaf
|
|
BLAKE2b-256 checksum How to use checksums |
5aa9944066aab1c1fbc58219c9a36033ffe5e5192518187c1a49e06e2e0b97b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.8
|
Security for wx-robot-client 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.