Python的飞书群组机器人调用方法集合
Project description
说明
PyFeishuGroupBot 是一个基于飞书机器人API的Python库,用于发送消息到飞书群组。
安装
pip install PyFeishuGroupBot
使用
from PyFeishuGroupBot import *
bot = FeishuGroupBot("your_webhook_url")
bot.send_text("Hello, Feishu!")
消息类型
- 文本消息
- 卡片消息
- 富文本消息
- 图片消息
- 群名片消息
消息演示
from PyFeishuGroupBot import FeishuGroupBot
# 初始化机器人
bot = FeishuGroupBot("https://open.feishu.cn/open-apis/bot/v2/hook/******")
# 发送消息
bot.send_text("Hello, world!")
# 发送卡片消息
bot.send_card("标题", "消息")
# 发送图片
bot.send_image("img_ecffc3b9-8f14-400f-a014-05eca1a4310g")
# 发送富文本消息
bot.send_rich_text("Title", [{"tag": "text","text": "项目有更新: "}, {"tag": "a","text": "请查看","href": "http://www.example.com/"}, {"tag": "at", "user_id": "ou_18eac8********17ad4f02e8bbbb"}])
# 发送群名片
bot.send_group_share(["oc_f5b1a7eb27ae2****339ff"])
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyfeishugroupbot-0.0.2.tar.gz.
File metadata
- Download URL: pyfeishugroupbot-0.0.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3105f1e3820d36f5e659a9fff9dc181448065dff2be6585b205be319c3832882
|
|
| MD5 |
d989e3273c312ceee0cd5453d1a27012
|
|
| BLAKE2b-256 |
9c9950bda4aa4629759b0fd1fe0c7be1b033bd2987a578f7cd18fa2af074f1b9
|
File details
Details for the file pyfeishugroupbot-0.0.2-py3-none-any.whl.
File metadata
- Download URL: pyfeishugroupbot-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
296e408b041c47ac0417ac4f7f022e6cea0c9208db11b35886b4d629d7b7d9a5
|
|
| MD5 |
46c01147c69d6e99724461453c4f9045
|
|
| BLAKE2b-256 |
e0d41aefb0506446723fc9310b56e09a094768161cde5d30663ef4be8d8ed98f
|