Skip to content

基于飞书官方文档,封装的飞书消息机器人接口。

Notifications You must be signed in to change notification settings

rexyan/feishu_chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

简介

基于飞书官方文档,封装的飞书消息机器人接口。支持简单的消息格式校验,获取发送消息所需 file_key, image_key 等。更多使用示例,可参考接口文档

使用示例

安装

pip install -U feishu-chatbot

发送文本

from chatbot import ChatBotClient, TextChatBot

client = ChatBotClient(app_id="xxx", app_secret='xxx')
user = client.get_user_id_by_email("[email protected]")

data = {
    "msg_type": "text",
    "content": {"text": "示例文本消息"},
    "receive_id": user["open_id"],
}
chatbot = TextChatBot.set_client(client).set_data(data).build()
chatbot.send()

About

基于飞书官方文档,封装的飞书消息机器人接口。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages