{"id":24596,"library":"slack-blocks-markdown","title":"slack-blocks-markdown","description":"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.","status":"active","version":"0.2.1","language":"python","source_language":"en","source_url":"https://github.com/atacan/slack-blocks-markdown","tags":["slack","markdown","block-kit","mistletoe","conversion"],"install":[{"cmd":"pip install slack-blocks-markdown","lang":"bash","label":"Latest stable release"}],"dependencies":[{"reason":"Markdown parsing engine used to convert Markdown to an AST which is then rendered to Slack Block Kit","package":"mistletoe","optional":false}],"imports":[{"note":"The main class is exported at package level, not nested in a submodule.","wrong":"from slack_blocks_markdown.markdown import SlackBlocksMarkdown","symbol":"SlackBlocksMarkdown","correct":"from slack_blocks_markdown import SlackBlocksMarkdown"}],"quickstart":{"code":"from slack_blocks_markdown import SlackBlocksMarkdown\n\nconverter = SlackBlocksMarkdown()\nblocks = converter.markdown_to_blocks(\"# Hello\\n\\nThis is **bold** and `code`\")\nprint(blocks)","lang":"python","description":"Parse Markdown string and output Slack Block Kit blocks as a list of dicts."},"warnings":[{"fix":"Use `converter.markdown_to_blocks(md_string)` instead.","message":"The 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.","severity":"deprecated","affected_versions":"<0.1.2"},{"fix":"Ensure your Python version is 3.11 or higher. Use `python -V` to check.","message":"The library requires Python >=3.11 due to use of `str.removeprefix` and other 3.11+ features. Attempting to install on older Python will fail.","severity":"gotcha","affected_versions":"all"},{"fix":"Check the README or test coverage for a list of supported elements. Use only common Markdown (headers, paragraphs, lists, code, links, inline styles).","message":"Not 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.","severity":"gotcha","affected_versions":"all"},{"fix":"Use the Slack SDK or direct HTTP POST to `chat.postMessage` with `\"blocks\": converter.markdown_to_blocks(md_string)`.","message":"The returned blocks are plain Python dicts, not Slack SDK objects. You must post them to Slack via the Web API yourself.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `from slack_blocks_markdown import SlackBlocksMarkdown`","cause":"Incorrect import path: importing from the wrong module or misspelling.","error":"AttributeError: module 'slack_blocks_markdown' has no attribute 'SlackBlocksMarkdown'"},{"fix":"Avoid unsupported Markdown elements. Check the README for supported syntax.","cause":"Parsing a markdown string with unsupported syntax (e.g., definition list) may cause internal render methods to fail if token.children is None.","error":"TypeError: 'NoneType' object is not iterable"},{"fix":"Upgrade to the latest version: `pip install slack-blocks-markdown --upgrade`","cause":"Ordered list tokens may lack a `start` attribute when the list is not numerically starting? This was a bug fixed in v0.1.2. Ensure you are using >=0.1.2.","error":"KeyError: 'start'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}