Skip to main content

slack-events

Typed Slack events, dispatch, and bot reply helpers.

pip install slack-events
pip install 'slack-events[fastapi,client]'

The Python import is slack_events. The base package depends only on typing-extensions; pydantic, fastapi, and client extras enable validation, HTTP routing, and the Slack SDK client respectively.

Responding with Block Kit

Thread.post, Message.reply, SlashCommand.respond, Action.respond, and string returns from SlackBot command handlers accept standard Markdown. They send a markdown block and top-level text containing the same content for notifications and screen readers. Slack performs the Markdown conversion. post_stream uses Slack's native Markdown streaming protocol; its post-and-edit fallback sends blocks on both the initial post and every update.

await message.reply("## Results\n**Done.** See [the report](https://example.com).")

Use explicit blocks= for interactive layouts, structured rich_text, or legacy Slack mrkdwn. In this case text is your accessible fallback and should contain all necessary information. Explicit blocks are passed through unchanged; [] is an intentional opt-out. Raw dictionary returns and the low-level dispatcher also remain caller-controlled.

message_payload(text, blocks=...) exposes the same policy to response layers that call Slack directly. Generated Markdown is capped at Slack's cumulative 12,000-character limit, with a visible truncation notice. Applications can use truncate_markdown to reserve room for a link to the full response. Callers supplying their own blocks are responsible for block limits and content.

Slack's references:

In mo, finalized replies replace the complete message with Markdown blocks after stopping a native stream. Blocks passed to chat.stopStream would be appended to the streamed content, so that method is not used to replace the answer.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slack_events-0.1.0.tar.gz (33.0 kB view details)

Uploaded Source

Built Distribution

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

slack_events-0.1.0-py3-none-any.whl (39.0 kB view details)

Uploaded Python 3

File details

Details for the file slack_events-0.1.0.tar.gz.

File metadata

  • Download URL: slack_events-0.1.0.tar.gz
  • Upload date:
  • Size: 33.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","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}

File hashes

Hashes for slack_events-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bf281a73024184c41d952c65cb1ba14fb4dfe33300cec9fe925d0f7e766c4f2c
MD5 6da5108fd5daded342f568d0ea119f16
BLAKE2b-256 7a163930e3725f88e5d0433c7811236668343a6ce63d2005ac038d2fc180ca99

See more details on using hashes here.

File details

Details for the file slack_events-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: slack_events-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 39.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","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}

File hashes

Hashes for slack_events-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a1b0b50201615b61914fca3142ebd497ccf867f1cb534b0ffa2002092459fca8
MD5 2a7f3e9f1630eb67e68c68d8697fbe2b
BLAKE2b-256 ed83431c372b1e63a650fb1e687e37238646e061d84b8f9fbd030d71ce2cfdd2

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

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