skillfed

markdown-it-pyrs

A Python interface for markdown-it.rs, using Rust for blazingly fast Markdown parsing ⚡️

markdown-it-pyrs v0.4.0 122.1K downloads/30d#11,961 on PyPI63
Permissive license Active released

What it is and what it does

markdown-it-pyrs wraps the Rust markdown-it.rs library to provide a fast Markdown parser for Python. It parses CommonMark, GitHub Flavored Markdown, and other dialects, rendering to HTML or an abstract syntax tree (Node tree). The API mirrors markdown-it-py, so existing code can often switch with minimal changes.

The main trade-off is speed for flexibility: because the parser is compiled Rust, you cannot write plugins in Python or add them dynamically at runtime. The library is currently in Beta and has no runtime dependencies beyond Python itself. It ships prebuilt wheels for modern CPython versions across common platforms, though installation requires a compatible wheel or a Rust build environment.

Use it for:

  • Parse Markdown documents to HTML in performance-critical applications where speed matters more than dynamic plugin extensibility.
  • Convert Markdown to an AST for programmatic inspection, transformation, or custom rendering without writing a parser.
  • Enable GitHub Flavored Markdown features (tables, strikethrough, task lists) in a Python application with minimal setup.
  • Migrate from markdown-it-py to a faster alternative when profiling shows Markdown parsing is a bottleneck.
  • Render Markdown with built-in plugins like footnotes, front matter, or smart quotes without external dependencies.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Rust-backed Python Markdown parser that renders CommonMark, GitHub Flavored Markdown, and other dialects to HTML or AST, with a Python API compatible with markdown-it-py.

Yes, if you need fast Markdown parsing and can accept that plugins must be chosen at install time rather than added dynamically. The library is actively maintained, has no vulnerabilities, and offers a familiar API. Install friction is moderate due to compiled wheels, but prebuilt binaries cover common platforms. Not recommended if you require Python 3.8 support or dynamic plugin authorship in Python.

Install

markdown-it-pyrs on PyPI

pip

pip install markdown-it-pyrs

uv

uv add markdown-it-pyrs

poetry

poetry add markdown-it-pyrs

Installing markdown-it-pyrs

Before you install

Medium install friction due to compiled wheels; prebuilt binaries available for CPython 3.10–3.12 on macOS, Linux, and Windows, but no pure-Python fallback. Active maintenance with recent commits; currently in Beta status.

License in practice

Licensed under Apache 2.0 (permissive); no restrictions on commercial or private use.

Quickstart

pip install markdown-it-pyrs

from markdown_it_pyrs import MarkdownIt

md = MarkdownIt("commonmark").enable("table")
html = md.render("# Hello, world!")
node = md.tree("# Hello, world!")

Requires Python 3.9 or later; no Python 3.8 support.

Verify before relying

  • Whether PyPy wheels are actually available (classifiers list PyPy but friction_evidence shows only CPython wheels).
  • Current state of WASM/pyodide support mentioned as 'maybe not for long' in the description.
  • Whether the 20x speed claim versus markdown-it-py holds for typical real-world documents beyond the CommonMark spec.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.9)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 661 days since the last release
Last repo commit
First released
Downloads 122,070/month — #11,961 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: markdown_it_pyrs-0.4.0-cp310-cp310-macosx_10_12_x86_64.whl; markdown_it_pyrs-0.4.0-cp310-cp310-macosx_11_0_arm64.whl; markdown_it_pyrs-0.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; markdown_it_pyrs-0.4.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; markdown_it_pyrs-0.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; markdown_it_pyrs-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; markdown_it_pyrs-0.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl; markdown_it_pyrs-0.4.0-cp310-none-win32.whl; markdown_it_pyrs-0.4.0-cp310-none-win_amd64.whl; markdown_it_pyrs-0.4.0-cp311-cp311-macosx_10_12_x86_64.whl; markdown_it_pyrs-0.4.0-cp311-cp311-macosx_11_0_arm64.whl; markdown_it_pyrs-0.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; markdown_it_pyrs-0.4.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; markdown_it_pyrs-0.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; markdown_it_pyrs-0.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; markdown_it_pyrs-0.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl; markdown_it_pyrs-0.4.0-cp311-none-win32.whl; markdown_it_pyrs-0.4.0-cp311-none-win_amd64.whl; markdown_it_pyrs-0.4.0-cp312-cp312-macosx_10_12_x86_64.whl; markdown_it_pyrs-0.4.0-cp312-cp312-macosx_11_0_arm64.whl

Keywords: markdown, lexer, parser, commonmark, markdown-it

Development Status :: 4 - BetaLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: RustTopic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing :: Markup

Tags

fast markdown parser pythonrust markdown renderingcommonmark gfm parsermarkdown to html convertermarkdown ast treemarkdown-it python bindinghigh-performance markdown
rust-bindingmarkdown-parserperformance-focused

More Python Modules packages