pyblock-builder
A lightweight Python library with a declarative syntax for simplifying building apps using Slack's Block Kit UI framework
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-builderuv
uv add pyblock-builderpoetry
poetry add pyblock-builderInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
blockkitBlockKit builds Slack UI blocks…
permissive · top 15,000 on PyPI
slack-boltBolt for Python is a framework for building…
permissive · top 5,000 on PyPI
slackblocksBuilds Slack Block Kit messages…
permissive · top 15,000 on PyPI
prefect-slackProvides prebuilt Prefect tasks and blocks to…
permissive · top 15,000 on PyPI
slack-sdkProvides Python bindings for Slack's Web API,…
permissive · top 1,000 on PyPI
slackerSlacker is a Python client library for the…
permissive · top 15,000 on PyPI
XBlockXBlock is a Python component architecture for…
permissive · top 15,000 on PyPI
slackclientProvides Python interfaces to Slack's Web API…
permissive · top 5,000 on PyPI
slackify-markdownConverts standard Markdown to Slack-compatible…
permissive · top 15,000 on PyPI
slackwebSends messages to Slack channels via incoming…
permissive · top 15,000 on PyPI