Skip to main content

WeGroupChatBot

group chat bot for Wechat of enterprise 企业微信群机器人接口

usage:

GroupChatBot

#Init

from WeGroupChatBot import GroupChatBot
import os

# https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=8a6b7936-06b1-4ada-ab66-f6389d78f053

bot = GroupChatBot('8a6b7936-06b1-4ada-ab66-f6389d78f053')

# or support reverse proxy at version 0.0.6
bot = GroupChatBot('http://qyapi.weixin.test.com.local/cgi-bin/webhook/send?key=8a6b7936-06b1-4ada-ab66-f6389d78f053')

# send text

bot.send_text('hello world!')

# send markdown
bot.send_markdown('实时新增用户反馈<font color=\"warning\">132例</font>,请相关同事注意。\n'
                             '>类型:<font color=\"comment\">用户反馈</font> \n'
                             '>普通用户反馈:<font color=\"comment\">117例</font> \n'
                             '>VIP用户反馈:<font color=\"comment\">15例</font>'
                             )

# send a news
bot.send_a_news('Red Alert 2',
                           'https://www.baidu.com/link?url'
                           '=7eniCd8AvgT6WmhCiBTdrZKSECWtPFL2dLrpLvooBWcNUaqc9OCnzF4mKQwh6T5zTlxhvle0GHhcsyzQseYfiveXHP'
                           'otyNJLxMgO9vbqtrCCWBj9iDce2TM0RrBJe_VVrug2O2kfd4jQo4phkmwOCJCY2Hnfp3nW9XmPjFZ9JtFK0YQfQvOpV'
                           '71I7Frhyz78uy8_0WU_Y7VFv6QwFJ_uWxIUVaj7DHRc6zWdVNpdl9vVCyOXxOvK-m9ayHiqEabq&wd=&eqid=b91f80'
                           'e90008d81e000000055d24a9bb',
                           picurl='https://gss0.bdstatic.com/-4o3dSag_xI4khGkpoWK1HF6hhy/baike/s%3D220/sign'
                                  '=7ec55f8b6263f624185d3e01b745eb32/caef76094b36acafa207424e75d98d1000e99c99.jpg')



#send file 

bot.send_file(os.path.join(os.path.abspath(os.path.dirname(__file__)), './tests/2019.png'))

# When used in the reverse proxy, you must specify a specific media upload URL as the key, as shown in the following example
bot = GroupChatBot('http://qyapi.weixin.test.com.local/cgi-bin/webhook/upload_media?key=8a6b7936-06b1-4ada-ab66-f6389d78f053&type=file')
bot.send_file(os.path.join(os.path.abspath(os.path.dirname(__file__)), './tests/2019.png'))

Bot groups

from WeGroupChatBot import GroupChatBots
bots= GroupChatBots('a73c9432-24f6-419b-a643-70baae301d17', 'a73c9432-24f1-418b-a643-70baae301d17')

# send text

bots.send_text('hello world!')

Metadata

Release files for wegroupchatBot 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for wegroupchatBot 0.0.7
File Interpreter ABI Platform Actions
wegroupchatBot-0.0.7-py3-none-any.whl Python 3 none any Details for wegroupchatBot-0.0.7-py3-none-any.whl

Release files / wegroupchatBot-0.0.7-py3-none-any.whl

Download URL wegroupchatBot-0.0.7-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa4c45dc394b74cafc08a725e3197a1fbe9316d35a471c08df2983959659f940
BLAKE2b-256 checksum
How to use checksums
2632f858417f9822edf67184579ba7a8fe869cd458f8d3e4309c190b2604cdef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.3

Security for wegroupchatBot 0.0.7

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page