Slackify Markdown

0.2.2 · active · verified Thu Apr 16

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.

Common errors

Warnings

Install

Imports

Quickstart

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```

view raw JSON →