Skip to main content

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"])

更新日志

2025年8月4日 更新 Github Actions

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.6.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.6-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyfeishugroupbot-0.0.6.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyfeishugroupbot-0.0.6.tar.gz
Algorithm Hash digest
SHA256 93c294730e4c4a867b1317458b55a263e750a58c4e4f69a3e7bb524494604ba4
MD5 c110e76d8cce36c3ee3ad47d64e4fa15
BLAKE2b-256 51dcdb50e7fe1036e080f6ab90d4ccc680a3313fb2294da010bb1a4e9039b59f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyfeishugroupbot-0.0.6.tar.gz:

Publisher: python-publish.yml on Moxin1044/Py-FeishuGroupBot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for pyfeishugroupbot-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 48bc7a0ad9ed00373785cfa5daaf5db7b6b83db7bbdb9f7cc5be483d9bb86345
MD5 e24594dcf874acd26c1390e7610467a5
BLAKE2b-256 1121c19a7fd2f712eefcb1959c19c748e2f8ef6b33b00d22c5185d0bc6bcf5c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyfeishugroupbot-0.0.6-py3-none-any.whl:

Publisher: python-publish.yml on Moxin1044/Py-FeishuGroupBot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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