$npx skillfedfor your agent

slackblocks

Python wrapper for the Slack Blocks API

Worth itPyPI ChatReleased Aug 202678.5K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — slackblocks-2.1.0-py3-none-any.whl
v2.1.0 · released 2026-08-14 · Python >=3.10

Yes. Zero dependencies, active maintenance, permissive dual licensing, and no known vulnerabilities make it a safe choice. Install if you send structured Slack messages from Python and want to avoid JSON boilerplate and validation errors—the typed API and up-front validation pay off immediately. Requires Python 3.10 or newer.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or newer; Python 3.8/3.9 users must pin to the 1.x line.
  • Installs with zero runtime dependencies as a pure-Python wheel.
  • Active maintenance with a release on 2026-08-14 and 75 repository stars.

License · maintenance · safety

MIT (permissive) — Dual-licensed under MIT and BSD-3-Clause, permitting use in both permissive and copyleft projects; choose whichever fits your licensing requirements.

last release 2026-08-14 (0 days) · last repo commit 2026-08-14 · 75 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 78,520 downloads/mo, #14,436 on PyPI

Verify before relying

pip install slackblocks

from slackblocks import Message, HeaderBlock, SectionBlock, Button, ActionsBlock

message = Message(
    channel="#general",
    text="Build passed",
    blocks=[
        HeaderBlock("Build #482 passed :white_check_mark:"),
        SectionBlock(fields=["*Branch*\n`main`", "*Author*\n@nick"]),
        ActionsBlock(elements=[Button(text="View", url="https://example.com")])
    ]
)
  • Whether the package's round-trip parsing (Block.from_dict) handles all current Slack API responses without data loss.
  • Performance characteristics when building large messages with hundreds of blocks or elements.
  • Compatibility with Slack API changes after the 2026-08-14 release date.
Same gist for agents: .md · .json

What it is and what it does

slackblocks is a typed Python wrapper around Slack's Block Kit API that lets you construct rich Slack messages, modals, and home tabs using concise Python objects instead of verbose JSON. It enforces validation at construction time—character limits, required fields, mutually-exclusive options, element-type restrictions—so errors surface before the API call, not after. The library ships with full type hints and zero runtime dependencies, making it lightweight and IDE-friendly.

It integrates directly with official Slack SDKs via unpacking: `client.chat_postMessage(**message)` works without boilerplate. The package supports all current block types (including Alert, Card, Carousel, Container, Data Table, Plan, Task Card), elements (buttons, select menus, date/time pickers, checkboxes, radio groups, workflow buttons), composition objects, rich text, modals, views, and round-trip parsing of incoming Slack JSON back into objects.

Use it for

  • Build structured build-status notifications with fields, buttons, and dividers without writing JSON templates.
  • Generate approval-request modals with validation and interactive elements for workflow automation.
  • Construct data-driven Slack messages (e.g., incident alerts, report summaries) with type-safe field assembly.
  • Parse incoming Slack interaction payloads back into slackblocks objects for programmatic inspection and response.
  • Create reusable message templates as Python functions, leveraging type hints for IDE autocomplete and refactoring.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Zero dependencies, active maintenance, permissive dual licensing, and no known vulnerabilities make it a safe choice. Install if you send structured Slack messages from Python and want to avoid JSON boilerplate and validation errors—the typed API and up-front validation pay off immediately. Requires Python 3.10 or newer.

Install

slackblocks on PyPI

Before you install

Installs with zero runtime dependencies as a pure-Python wheel. Active maintenance with a release on 2026-08-14 and 75 repository stars.

Requires Python 3.10 or newer; Python 3.8/3.9 users must pin to the 1.x line.

License in practice

Dual-licensed under MIT and BSD-3-Clause, permitting use in both permissive and copyleft projects; choose whichever fits your licensing requirements.

Quickstart

pip install slackblocks

from slackblocks import Message, HeaderBlock, SectionBlock, Button, ActionsBlock

message = Message(
    channel="#general",
    text="Build passed",
    blocks=[
        HeaderBlock("Build #482 passed :white_check_mark:"),
        SectionBlock(fields=["*Branch*\n`main`", "*Author*\n@nick"]),
        ActionsBlock(elements=[Button(text="View", url="https://example.com")])
    ]
)

Verify before relying

  • Whether the package's round-trip parsing (Block.from_dict) handles all current Slack API responses without data loss.
  • Performance characteristics when building large messages with hundreds of blocks or elements.
  • Compatibility with Slack API changes after the 2026-08-14 release date.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 0 days since the last release
Last repo commit
First released
Downloads78,520 / month, #14,436 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: BSD LicenseLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Communications :: ChatTyping :: Typed

Evidence: slackblocks-2.1.0-py3-none-any.whl

Tags

Capabilities
slack message builder pythonblock kit wrapperslack blocks apityped slack messagesslack json generatorslack message validationslack message construction
Topics
slack-integrationmessage-generationtype-safe
PyPI keywords
blocksmessage generationmessagingslackslack blocksslackblocks

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “slack blocks api”

  • slackblocksBuilds Slack Block Kit messages programmatically in Python with type…
  • prefect-slackProvides prebuilt Prefect tasks and blocks to send Slack messages…
  • blockkitBlockKit builds Slack UI blocks programmatically with a fluent Python…

Give your agent the search over MCP, or paste the wish link into any chat.

More Chat packages

slack-sdk Worth it
PyPI · Networking · released Jun 2026

Provides Python bindings for Slack's Web API, webhooks, Socket Mode, OAuth, and other platform APIs, enabling apps to send messages, manage files, verify requests, and interact with Slack workspaces.

Install it if you need to integrate Python applications with Slack—whether for bots, notifications, or custom workflows.

MITpure Python · 3.7+
105.0Mdownloads / mo
python-telegram-bot Worth it
PyPI · Python Modules · released Jun 2026

Provides a pure Python asynchronous interface to the Telegram Bot API, with convenience methods and high-level classes for building chatbots.

Install it if you need to build or integrate with Telegram bots in Python.

LGPL-3.0-onlypure Python · 3.10+
43.0Mdownloads / mo
slackclient With conditions
PyPI · Networking · released Apr 2022

Provides Python interfaces to Slack's Web API and Real Time Messaging (RTM) API for building Slack applications and bots.

Install only if you are maintaining legacy code or have a specific reason not to migrate.

MITpure Python · 3.6.0+
7.7Mdownloads / mo
aiogram Worth it
PyPI · Python Modules · released Jul 2026

aiogram is an asynchronous Python framework for building Telegram bots using asyncio and aiohttp, with type hints, routing, state machines, and middleware support.

MITpure Python
4.0Mdownloads / mo
Telethon With conditions
PyPI · Chat · released Jun 2026

Telethon is an asyncio-based Python library that implements the MTProto protocol to interact with Telegram's API as a user account or bot, providing an alternative to Telegram's official bot API.

MITpure Python · 3.5+
3.7Mdownloads / mo
mleap Worth it
PyPI · Python Modules · released Jul 2026

Serializes and deserializes machine learning pipelines to a portable Bundle.ML format for cross-platform deployment and execution.

Apache-2.0pure Python · 3.10+
2.3Mdownloads / mo

See also pyblock-builder · blockkit · prefect-slack · slackweb · markdown-to-mrkdwn · md2Slack · mdformat-black · slack-bolt