Skip to main content

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

Project description

WeGroupChatBot

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

usage:

#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')

# 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'))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wegroupchatBot-0.0.4.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wegroupchatBot-0.0.4-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file wegroupchatBot-0.0.4.tar.gz.

File metadata

  • Download URL: wegroupchatBot-0.0.4.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/51.3.3 requests-toolbelt/0.8.0 tqdm/4.51.0 CPython/3.7.0

File hashes

Hashes for wegroupchatBot-0.0.4.tar.gz
Algorithm Hash digest
SHA256 94a1c463d714707fdf7315300503f63dcf9887df3af28728dbe3e2e885c9941f
MD5 cac941d890c96b8a670d2978dd0e723c
BLAKE2b-256 31a104523edf11e8e7604fd81fda40edb62faa25bf27748b444da3b11eb58db8

See more details on using hashes here.

File details

Details for the file wegroupchatBot-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: wegroupchatBot-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/51.3.3 requests-toolbelt/0.8.0 tqdm/4.51.0 CPython/3.7.0

File hashes

Hashes for wegroupchatBot-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 48cdb220c99e6ccd8b9c0465fa98aac2f79ee97cc8927f70e13380945df31a8a
MD5 0a4e2b353cf2011d004340533509a8b8
BLAKE2b-256 8d8bdb1d55642677330eb5c3d5f4cb066ebc9c38942fadc360ce245eaa96b3d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page