Skip to main content

bub-feishu

Feishu channel adapter for bub.

What It Provides

  • Channel implementation: FeishuChannel (name = "feishu")
  • Inbound message adaptation from Feishu to Bub ChannelMessage
  • Packaged Feishu skill resources under skills/feishu
  • feishu_send.py supports both text and card sending via --format text|card
  • feishu_edit.py updates an existing bot message

Installation

uv pip install bub-feishu

You can also install it with Bub:

bub install bub-feishu

Configuration

FeishuChannel reads settings from environment variables with the BUB_FEISHU_ prefix.

  • BUB_FEISHU_APP_ID (required): Feishu app ID
  • BUB_FEISHU_APP_SECRET (required): Feishu app secret
  • BUB_FEISHU_VERIFICATION_TOKEN (optional): webhook verification token
  • BUB_FEISHU_ENCRYPT_KEY (optional): webhook encrypt key
  • BUB_FEISHU_ALLOW_USERS (optional): JSON array or comma-separated allowlist of sender user identifiers
  • BUB_FEISHU_ALLOW_CHATS (optional): JSON array or comma-separated allowlist of chat IDs
  • BUB_FEISHU_BOT_OPEN_ID (optional): implementation-specific bot open ID used for exact mention matching in group chats; this is not the Feishu app ID
  • BUB_FEISHU_LOG_LEVEL (optional, default: INFO)

Runtime Behavior

  • Session ID format: feishu:<chat_id>
  • Inbound messages:
    • ignores messages missing chat_id or message_id
    • applies allowlist filters when configured
    • treats messages starting with , as Bub commands
  • Message activation (is_active = true) when any of these is true:
    • message is from p2p
    • content contains bub
    • content starts with ,
    • message mentions the bot
    • message replies to a previous bot message

Payload Shape

Inbound non-command messages are encoded as JSON string content, including fields like:

  • message
  • message_id
  • type
  • sender_id
  • sender_name
  • sender_is_bot
  • date
  • media
  • reply_to_message

Outbound Notes

  • Inbound non-command messages set output_channel="null" to disable channel outbound routing.
  • The channel is inbound-only; Feishu send/edit/reaction actions are handled through the packaged scripts or direct OpenAPI calls.
  • Reaction support is available through the Feishu message reaction API.

TODO

  • Evaluate Feishu bot menu / chat menu tree as a Telegram-like command entrypoint for common actions and submenus.
  • Evaluate a Feishu-native processing feedback mechanism comparable to Telegram typing updates.
  • Evaluate whether voice-message handling is feasible and worth supporting in the Feishu skill/runtime.

Metadata

Release files for bub-feishu 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bub-feishu 0.0.3
File Size Uploaded Provenance Actions
bub_feishu-0.0.3.tar.gz 14.4 kB Without provenance Details for bub_feishu-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bub-feishu 0.0.3
File Interpreter ABI Platform Actions
bub_feishu-0.0.3-py3-none-any.whl Python 3 none any Details for bub_feishu-0.0.3-py3-none-any.whl

Total release size: 31.5 kB

Release files / bub_feishu-0.0.3.tar.gz

Download URL bub_feishu-0.0.3.tar.gz
Size 14.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7bf895a6e131c27979c02ab8d9e29207c7ddba0417fb0af76357cb7076993df0
BLAKE2b-256 checksum
How to use checksums
745024e5d420cd1c60744bfc991140e2dcbf0f7f7ffe3ab09026d5ee16395ece
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / bub_feishu-0.0.3-py3-none-any.whl

Download URL bub_feishu-0.0.3-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f274f82e4f37c19cb27fb1d7660bc72a625ffb1eea1225e82b248fefd0feceef
BLAKE2b-256 checksum
How to use checksums
2c94356552614fe933e69140a01bbf32b75ddc1dbb5ff97e45dfff2662e9a501
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for bub-feishu 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page