{"id":24010,"library":"markdown-it-pyrs","title":"markdown-it-pyrs","description":"A Python interface for markdown-it.rs, using Rust for blazingly fast Markdown parsing. Current version 0.4.0, requires Python >=3.9. Release cadence is irregular.","status":"active","version":"0.4.0","language":"python","source_language":"en","source_url":"https://github.com/chrisjsewell/markdown-it-pyrs","tags":["markdown","rust","parser","fast","markdown-it"],"install":[{"cmd":"pip install markdown-it-pyrs","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Commonly confused with this pure Python library; markdown-it-pyrs is the Rust-backed version.","package":"markdown-it-py","optional":false}],"imports":[{"note":"markdown-it-py uses 'markdown_it', but markdown-it-pyrs uses 'markdown_it_pyrs'.","wrong":"from markdown_it import MarkdownIt","symbol":"MarkdownIt","correct":"from markdown_it_pyrs import MarkdownIt"}],"quickstart":{"code":"from markdown_it_pyrs import MarkdownIt\n\nmd = MarkdownIt()\nhtml = md.render(\"Hello **world**\")\nprint(html)","lang":"python","description":"Create a MarkdownIt instance and render Markdown to HTML."},"warnings":[{"fix":"Pass xhtml=True to md.render(text, xhtml=True) instead of to the constructor.","message":"In v0.2.1, the xhtml option was moved from constructor to the render method. Code that passed xhtml=True to MarkdownIt() will break.","severity":"breaking","affected_versions":">=0.2.1"},{"fix":"Upgrade to Python 3.9 or later.","message":"Python 3.8 support was dropped in v0.4.0. Users on Python 3.8 must stay on an older version or upgrade Python.","severity":"deprecated","affected_versions":">=0.4.0"},{"fix":"Use 'import markdown_it_pyrs' or 'from markdown_it_pyrs import MarkdownIt'.","message":"The library name and import path differ: PyPI package name uses hyphens (markdown-it-pyrs), but Python import uses underscores (markdown_it_pyrs).","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":"Install markdown-it-py or change import to 'from markdown_it_pyrs import MarkdownIt'.","cause":"Installed markdown-it-pyrs but tried importing 'markdown_it' (which is the pure Python package).","error":"ModuleNotFoundError: No module named 'markdown_it'"},{"fix":"Remove xhtml from MarkdownIt() and pass it to render(): md.render(text, xhtml=True).","cause":"Passing xhtml as a constructor argument, but starting from v0.2.1 it is only accepted in the render method.","error":"TypeError: __init__() got an unexpected keyword argument 'xhtml'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}