Python bindings for the Comrak Rust library, a fast CommonMark/GFM parser
pip install comrak
- Python 3.9+
Fast Markdown to HTML parser in Rust, shipped for Python via PyO3.
All options are exposed in a simple manner:
>>> import comrak
>>> opts = comrak.ExtensionOptions()
>>> comrak.render_markdown("foo :smile:", extension_options=opts)
'<p>foo :smile:</p>\n'
>>> opts.shortcodes = True
>>> comrak.render_markdown("foo :smile:", extension_options=opts)
'<p>foo 😄</p>\n'
Refer to the Comrak docs for all available options.
Tested with small (8 lines) and medium (1200 lines) markdown strings
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:
Licensed under the 2-Clause BSD License. See LICENSE for all the details.