Registry / serialization / markdown-it-pyrs

markdown-it-pyrs

JSON →
library0.4.0pypypi✓ verified 84d ago

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.

pip install markdown-it-pyrs
INSTALL
IMPORT
SIG · MARKDOWN-IT-PYRS
M
markdown-it-pyrs
serializationpythonv0.4.0
Install
1.8s avg
Import
Disk
21MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.4.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 1.6s
py 3.11
✕ build_error
✓ 1.9s
py 3.12
✕ build_error
✓ 1.6s
py 3.13
✕ build_error
✕ build_error
py 3.9
✕ build_error
✓ 1.9s
21MB installed
● package 21MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MarkdownIt
from markdown_it_pyrs import MarkdownIt
from markdown_it import MarkdownIt
markdown-it-py uses 'markdown_it', but markdown-it-pyrs uses 'markdown_it_pyrs'.

Create a MarkdownIt instance and render Markdown to HTML.

from markdown_it_pyrs import MarkdownIt md = MarkdownIt() html = md.render("Hello **world**") print(html)
Debug
Known issues
breakingIn v0.2.1, the xhtml option was moved from constructor to the render method. Code that passed xhtml=True to MarkdownIt() will break.
fix
Pass xhtml=True to md.render(text, xhtml=True) instead of to the constructor.
affects: >=0.2.1
deprecatedPython 3.8 support was dropped in v0.4.0. Users on Python 3.8 must stay on an older version or upgrade Python.
fix
Upgrade to Python 3.9 or later.
affects: >=0.4.0
gotchaThe library name and import path differ: PyPI package name uses hyphens (markdown-it-pyrs), but Python import uses underscores (markdown_it_pyrs).
fix
Use 'import markdown_it_pyrs' or 'from markdown_it_pyrs import MarkdownIt'.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'markdown_it'
Installed markdown-it-pyrs but tried importing 'markdown_it' (which is the pure Python package).
fix
Install markdown-it-py or change import to 'from markdown_it_pyrs import MarkdownIt'.
TypeError: __init__() got an unexpected keyword argument 'xhtml'
Passing xhtml as a constructor argument, but starting from v0.2.1 it is only accepted in the render method.
fix
Remove xhtml from MarkdownIt() and pass it to render(): md.render(text, xhtml=True).
Upgrade
Version history
0.4.0latest on PyPI · released Oct 22, 2024
Audit
Dependencies
markdown-it-pyrequiredCommonly confused with this pure Python library; markdown-it-pyrs is the Rust-backed version.
Agent activity
4 hits · last 30 days
node
4
Resources
markdown-it-pyrs — pip install markdown-it-pyrs · libregistry