Skip to content

About

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

Resources

Stars

8 stars

Watchers

1 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

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("jack@gmail.com")

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

8 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages