skillfed

pyblock-builder

A lightweight Python library with a declarative syntax for simplifying building apps using Slack's Block Kit UI framework

pyblock-builder v0.2.10 79.4K downloads/30d#14,359 on PyPI6
Permissive license BSD-3-Clause AGING released

What it is and what it does

PyBlock Builder is a lightweight Python wrapper around Slack's Block Kit UI framework that lets you construct Slack app layouts (messages, modals, app home screens) using declarative Python classes instead of writing raw JSON. It provides surfaces (Message, Modal, AppHome), blocks (Section, Input, Divider, etc.), elements (Button, SelectMenu, DatePicker), and composition objects (Text, Option, ConfirmationDialog), plus a helper module for Slack's mrkdwn text formatting.

The library is optimized for use with Slack's Bolt for Python SDK and uses method chaining to keep code concise. It covers most common Block Kit components but does not yet support Workflow Steps or Rich Text blocks. The package has low install friction (one runtime dependency) but is in aging maintenance—the last release was 2024-03-13 with no recent commits, so it receives no active development or bug fixes.

Use it for:

  • Build Slack bot message layouts with Section, Button, and Input blocks without writing JSON by hand.
  • Create interactive Slack modals for user input forms using declarative Python classes.
  • Format Slack message text with mrkdwn helpers (bold, blockquote, etc.) to reduce string manipulation.
  • Construct app home screens for Slack apps using AppHome surface and block composition.
  • Prototype Slack app UIs quickly in Bolt for Python projects with method-chaining syntax.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

PyBlock Builder provides Python classes and helper functions to construct Slack Block Kit UI layouts declaratively, reducing boilerplate when building Slack app interfaces.

Yes, if you are actively building Slack apps with Bolt for Python and want to avoid writing Block Kit JSON by hand. The low install friction and permissive license make it a safe add. However, be aware that maintenance is aging—no updates since early 2024—so if Slack's Block Kit API evolves significantly or you encounter bugs, you may need to fork or switch to an actively maintained alternative.

Install

pyblock-builder on PyPI

pip

pip install pyblock-builder

uv

uv add pyblock-builder

poetry

poetry add pyblock-builder

Installing pyblock-builder

Before you install

Low install friction with a single lightweight runtime dependency (typing-extensions). Maintenance is aging—last release was 2024-03-13 and the repository has not been updated since 2025-11-12, so expect no active bug fixes or feature development.

License in practice

BSD-3-Clause is permissive; you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install pyblock-builder

from pyblock_builder.surfaces import Message
from pyblock_builder.blocks import Section

msg = Message().add_block(Section(text="Hello, Slack!"))
print(msg.build())

Requires Python 3.10 or later (3.10, 3.11, or 3.12 supported); designed for use with Slack's Bolt for Python SDK.

Verify before relying

  • Whether the aging maintenance status and lack of recent commits affect real-world compatibility with current Slack Block Kit API changes.
  • How complete the coverage of Block Kit components is beyond the documented supported surfaces and blocks.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.10,<4.0)
Install friction low — pure-Python wheel
Runtime dependencies 1 — typing-extensions
Maintenance aging — 884 days since the last release
Last repo commit
First released
Downloads 79,437/month — #14,359 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyblock_builder-0.2.10-py3-none-any.whl

Keywords: slack-pyblock-builder, pyblock-builder, slack, bolt, pyblock, blockkit

License :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Topic :: Software Development :: DocumentationTopic :: Software Development :: Libraries :: Python Modules

Tags

slack block kit pythonslack ui builder libraryslack app interface constructionslack message layout pythonslack bolt ui helperdeclarative slack blocksslack blockkit wrapper
slack-integrationui-builderdeclarative-syntax

More Python Modules packages