GitHub - lmmx/comrak: Python bindings for the Comrak Rust library, a fast CommonMark/GFM parser (original) (raw)
comrak
Python bindings for the Comrak Rust library, a fast CommonMark/GFM parser
Installation
Requirements
- Python 3.9+
Features
Fast Markdown to HTML parser in Rust, shipped for Python via PyO3.
Options
All options are exposed in a simple manner:
import comrak opts = comrak.ExtensionOptions() comrak.render_markdown("foo :smile:", extension_options=opts) '
foo :smile:
\n' opts.shortcodes = True comrak.render_markdown("foo :smile:", extension_options=opts) 'foo 😄
\n'
Refer to the Comrak docs for all available options.
Benchmarks
Tested with small (8 lines) and medium (1200 lines) markdown strings
Contributing
Maintained by lmmx. Contributions welcome!
- Issues & Discussions: Please open a GitHub issue or discussion for bugs, feature requests, or questions.
- Pull Requests: PRs are welcome!
- Install the dev extra (e.g. with uv:
uv pip install -e .[dev]
) - Run tests (when available) and include updates to docs or examples if relevant.
- If reporting a bug, please include the version and the error message/traceback if available.
- Install the dev extra (e.g. with uv:
License
Licensed under the 2-Clause BSD License. See LICENSE for all the details.