monosans / pyromark

Blazingly fast Markdown parser for Python written in Rust.

Home Page:https://pyromark.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pyromark

CI Downloads

pyromark (stands for Python Rust Optimized Markdown) is a blazingly fast CommonMark-compliant Markdown parser for Python.

Uses pulldown-cmark Rust crate under the hood.

Installation

python -m pip install -U pyromark

Example

import pyromark

html = pyromark.markdown("# Hello world")
assert html == "<h1>Hello world</h1>\n"

Documentation

https://pyromark.readthedocs.io

Performance

128x faster than Markdown, 105x faster than markdown-it-py, 79x faster than mistune, 8x faster than markdown-it-pyrs.

If you use threading, the difference with other libraries will be even more enormous, since pyromark releases the GIL.

See benchmark.

License

MIT

About

Blazingly fast Markdown parser for Python written in Rust.

https://pyromark.readthedocs.io

License:MIT License


Languages

Language:Python 80.9%Language:Rust 19.1%