Registry / communication / slackify-markdown

slackify-markdown

JSON →
library0.2.4pypypi✓ verified 84d ago

A Python library that converts standard Markdown into Slack-compatible formatting (mrkdwn). It addresses the inconsistencies between standard Markdown and Slack's unique syntax, making it easy to display richly-formatted messages in Slack. The library is actively maintained with regular bug fixes and improvements.

pip install slackify-markdown
INSTALL
IMPORT
SIG · SLACKIFY-MARKDOWN
S
slackify-markdown
communicationpythonv0.2.4
Install
1.7s avg
Import
198ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.2.4 · 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
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.202s · 18.7MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.7s · import 0.194s · 19MB
17MB installed
● package 17MB
Code
Verified usage

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

slackify_markdown
from slackify_markdown import slackify_markdown
The primary function for converting Markdown to Slack mrkdwn.

This quickstart demonstrates how to import the `slackify_markdown` function and convert a multi-line Markdown string into Slack-compatible formatting (mrkdwn).

from slackify_markdown import slackify_markdown markdown_text = """ # Welcome to the **team**! This is a *test* message with a [link](https://example.com). - Item 1 - Item 2 ```python print("Hello, Slack!") ``` """ slack_output = slackify_markdown(markdown_text) print(slack_output) # Expected output: # *Welcome to the team!* # This is *test* message with a <https://example.com|link>. # • Item 1 # • Item 2 # ```python\nprint("Hello, Slack!")\n```
Debug
Known issues
breakingFormatting of bold text within headings has been fixed in v0.2.1. If your application previously relied on the malformed output (e.g., `**Step 1*: Description*` instead of `*Step 1: Description*`), this change will alter the rendered output.
fix
Upgrade to `slackify-markdown>=0.2.1`. Review existing Slack messages to ensure the corrected formatting is as expected.
affects: <0.2.1
gotchaVersions prior to v0.2.2 had a thread-safety issue where internal heading state was shared across instances. This could lead to incorrect output when `slackify_markdown` was called concurrently from multiple threads.
fix
Upgrade to `slackify-markdown>=0.2.2` to ensure correct behavior in multi-threaded environments. This version uses an instance variable for heading state, resolving the issue.
affects: <0.2.2
gotchaSlack's `mrkdwn` is a specific dialect and not fully compatible with standard Markdown. For instance, Slack uses `*bold*` for bold and `_italic_` for italics in some contexts, and `[text](url)` becomes `<url|text>`. This library handles these conversions, but direct use of standard Markdown in Slack without conversion will often break.
fix
Always pass standard Markdown through `slackify_markdown` to ensure proper rendering in Slack. Do not expect raw standard Markdown to render correctly.
affects: All versions
Errors
Common errors & fixes
Markdown heading with bold text renders incorrectly in Slack (e.g., `### **Step 1**: Title` results in `**Step 1*: Title*`)
A bug in `slackify-markdown` versions prior to `0.2.1` incorrectly processed bold formatting within headings, leading to malformed Slack output.
fix
Upgrade the library to version `0.2.1` or higher using `pip install --upgrade slackify-markdown`.
Inconsistent or corrupted Slack output when `slackify_markdown` is used in a multi-threaded application (e.g., different threads produce wrong heading formatting).
Versions of `slackify-markdown` prior to `0.2.2` contained a thread-safety bug where a shared class variable for heading state could be corrupted by concurrent calls.
fix
Upgrade the library to version `0.2.2` or higher using `pip install --upgrade slackify-markdown` to ensure thread-safe operation.
ModuleNotFoundError: No module named 'slackify_markdown'
The `slackify-markdown` library is not installed in the active Python environment or is not accessible on the Python path.
fix
Install the library using `pip install slackify-markdown`. If you are in a virtual environment, ensure it is activated before installation.
Upgrade
Version history
0.2.4latest on PyPI · released May 25, 2026
Audit
Dependencies
markdown-it-pyrequiredCore parsing engine for Markdown to HTML conversion before slackification.
Agent activity
27 hits · last 30 days
node
26
OpenAI (training)
1
Resources
slackify-markdown — pip install slackify-markdown · libregistry