Skip to main content

Python的飞书群组机器人调用方法集合

Project description

说明

FeishuGroupBot 是一个基于飞书机器人API的Python库,用于发送消息到飞书群组。

安装

pip install FeishuGroupBot

使用

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

pyfeishugroupbot-0.0.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyfeishugroupbot-0.0.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file pyfeishugroupbot-0.0.1.tar.gz.

File metadata

  • Download URL: pyfeishugroupbot-0.0.1.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

Hashes for pyfeishugroupbot-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fcf67c14e9c3a17b1456fd2bb5608357bf8f6948532673609a77a2e6b0203c35
MD5 6a56c2d0b1eb0cdbc30ea544b735ca44
BLAKE2b-256 77c394c93905d8fc21cacd8a3655843b3e1de6a1c7511781a8ffedea54ece30b

See more details on using hashes here.

File details

Details for the file pyfeishugroupbot-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pyfeishugroupbot-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 081424db8063eac141d681dac10a4a758913cca9434db3e6e27bcdac1aa473fd
MD5 14c8729ab4240fc37b14fc8f7986a03c
BLAKE2b-256 4fb85e3eed45bcaa1f4343716e120f9e969f9b2aeb60dea528058f424d264185

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