Skip to content

一个基于企业微信开发的用于消息通知的 Python 库

License

Notifications You must be signed in to change notification settings

Micro-sheep/wechat_work

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

企业微信工具

这是一个基于企业微信 API 开发的用于消息通知的 Python 库

Guide

开始之前,请先跟随一下步骤创建一个企业微信应用

Installation

  • 通过 pip 安装
pip install wechat_work
  • 通过 gitpip 安装
pip install git+https://github.com/Micro-sheep/wechat_work.git

Examples

from wechat_work import WechatWork
corpid = '企业 ID'
appid = '企业应用 ID'
corpsecret = '企业应用 Secret'
users = ['企业微信的用户账号1', '企业微信的用户账号2']
w = WechatWork(corpid=corpid,
               appid=appid,
               corpsecret=corpsecret)
# 发送文本
w.send_text('Hello World!', users)
# 发送 Markdown
w.send_markdown('# Hello World', users)
# 发送图片
w.send_image('./hello.jpg', users)
# 发送文件
w.send_file('./hello.txt', users)

About

一个基于企业微信开发的用于消息通知的 Python 库

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages