Skip to main content

A simple API wrapper for WeCom (Worker Wechat) group bot to send msg.

Project description

wecom_bot_msg is a simple wrapper for WeCom (Worker Wechat ) group bot API, to send text, image, audio, files etc in groups, check official docs for more information.

wecom_bot_msg 是给企业微信群机器人API的封装,用作发送文本、图片、语音、文件等各类消息,更多信息可以查看官方文档

Installation

Install wecom_bot_msg using pip

pip install wecom_bot_msg

Usage

Simple usage to send text or image

from wecom_bot_msg import WecomBot

bot = WecomBot(api_key='YOUR_API_KEY')

# send text
success, err_msg = bot.send_text('hello')

# send image
success, err_msg = bot.send_image('/LOCAL/PATH/IMAGE')

More examples

# sent text with mentioned list (or mentioned_mobile_list)
bot.send_text('hello', mentioned_list=['kim','kttiy'])
bot.send_text('hello', mentioned_mobile_list=['18688888888','15688888888'])

TODO

  • send text
  • send image
  • send markdown
  • upload file
  • send audio
  • send news
  • send template card

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

wecom_bot_msg-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file wecom_bot_msg-0.1.0.tar.gz.

File metadata

  • Download URL: wecom_bot_msg-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for wecom_bot_msg-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4aafd2a91ae681aa9de3f2242f3707265b07ab9ab311946e93272a2cdc01aec9
MD5 8bccdabedd30101b8df848d6d99f5382
BLAKE2b-256 066890fdb35388edb42469433c3f07e589df80ac09d73d4fa5e0d83df7f54e3e

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