Registry / communication / slack-blocks-markdown

slack-blocks-markdown

JSON →
library0.2.1pypypi✓ verified 79d ago

Convert Markdown to Slack Block Kit blocks using mistletoe. Current version: 0.2.1, requires Python >=3.11. Releases are infrequent, mostly bugfixes and type hint improvements.

pip install slack-blocks-markdown
INSTALL
IMPORT
SIG · SLACK-BLOCKS-MARKD
S
slack-blocks-markdown
communicationpythonv0.2.1
Install
1.9s avg
Import
Disk
19MB
Pass rate
6/ 10
Env Coverage6 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.2.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✕ build_error
py 3.11
✓ —
✓ 2s
py 3.12
✓ —
✓ 1.8s
py 3.13
✓ —
✓ 1.9s
py 3.9
✕ build_error
✕ build_error
19MB installed
● package 19MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SlackBlocksRenderer
from slack_blocks_markdown import SlackBlocksRenderer
from slack_blocks_markdown import SlackBlocksMarkdown
markdown_to_block_objects
from slack_blocks_markdown import markdown_to_block_objects
markdown_to_blocks
from slack_blocks_markdown import markdown_to_blocks

Parse Markdown string and output Slack Block Kit blocks as a list of dicts.

from slack_blocks_markdown import SlackBlocksMarkdown converter = SlackBlocksMarkdown() blocks = converter.markdown_to_blocks("# Hello\n\nThis is **bold** and `code`") print(blocks)
Debug
Known issues
deprecatedThe method `convert` was renamed to `markdown_to_blocks` in v0.1.2. Using `convert` may still work but will be removed in a future release.
fix
Use `converter.markdown_to_blocks(md_string)` instead.
affects: <0.1.2
gotchaThe library requires Python >=3.11 due to use of `str.removeprefix` and other 3.11+ features. Attempting to install on older Python will fail.
fix
Ensure your Python version is 3.11 or higher. Use `python -V` to check.
affects: all
gotchaNot all Markdown features are supported. The library maps a subset of Markdown elements to Slack's Block Kit; unsupported elements (e.g., definition lists, footnotes) are silently ignored.
fix
Check the README or test coverage for a list of supported elements. Use only common Markdown (headers, paragraphs, lists, code, links, inline styles).
affects: all
gotchaThe returned blocks are plain Python dicts, not Slack SDK objects. You must post them to Slack via the Web API yourself.
fix
Use the Slack SDK or direct HTTP POST to `chat.postMessage` with `"blocks": converter.markdown_to_blocks(md_string)`.
affects: all
Upgrade
Version history
0.2.1latest on PyPI · released Dec 15, 2025
Audit
Dependencies
mistletoerequiredMarkdown parsing engine used to convert Markdown to an AST which is then rendered to Slack Block Kit
Agent activity
25 hits · last 30 days
node
22
OpenAI (training)
1
Resources
slack-blocks-markdown — pip install slack-blocks-markdown · libregistry