slackstyler is a Python package that converts strings written in Markdown into Slack message formatting. It provides a simple and convenient conversion of Markdown styles into Slack styles and can be effectively used when creating or integrating with Slack bots.
Project description
slackstyler
slackstyler
is a Python package that converts Markdown text into Slack message formatting. The motivation for creating this package is to allow Python developers to prepare and send richly-formatted messages to Slack in a way that's familiar and easy to use.
slackstyler
was inspired by JavaScript's slackify-markdown
library and also based on mistune
, a markdown parser in pure Python.
Features
- Converts Markdown text into Slack message formatting.
- Supports various Markdown syntaxes:
- Bold text
- Italic text
- Link
- and more...
Installation
Install slackstyler
with pip:
pip install slackstyler
Usage
Here is a quick example of how to use slackstyler
:
from slackstyler import SlackStyler
# Create a styler instance
styler = SlackStyler()
# Convert markdown text to slack message text
markdown_text = "Hello, **Slack**!"
slack_message = styler.convert(markdown_text)
print(slack_message)
When you run this code, you will see:
Hello, *Slack*!
Acknowledgments
This project was inspired by slackify-markdown
, a similar library written in JavaScript.
License
slackstyler
is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for slackstyler-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af09381de435bfb42803f60209014c405d2d9333cf9c24ba426863ddec6e18a9 |
|
MD5 | 39c117d0fca56f6ef80c5c105cbfcf1b |
|
BLAKE2b-256 | 678c51ec0a0bf75dcad76f8f8bc580c00d48a609ff4cd1fd2b292d23f14b700d |