skillfed

comrak

Python bindings for the Comrak Rust library, a fast CommonMark/GFM parser

comrak v0.0.16 284.1K downloads/30d#8,067 on PyPI12
Permissive license Active released

What it is and what it does

Comrak is a Python wrapper around the Comrak Rust library, exposing a fast CommonMark and GitHub Flavored Markdown parser. It offers two main rendering modes: `render_markdown()` for HTML output and `render_commonmark()` for normalized CommonMark text. The package exposes the full option surface of the underlying Rust library—Extension, Parse, and Render options—allowing fine-grained control over parsing behavior and output formatting, including support for alerts, shortcodes, and list style customization.

The binding has no runtime dependencies and ships with prebuilt wheels for modern Python versions (3.9–3.14) and multiple platforms, making installation straightforward. It is actively maintained and tracks Comrak 0.54. The package is suitable for applications that need fast, standards-compliant markdown processing with access to advanced parsing and rendering options.

Use it for:

  • Convert user-supplied markdown to safe HTML in web applications or content management systems.
  • Normalize and reformat markdown documents using CommonMark output and list-style options.
  • Parse markdown with GitHub Flavored Markdown extensions (tables, strikethrough, autolinks) for documentation tools.
  • Render markdown alerts and semantic HTML features in static site generators or documentation platforms.
  • Process markdown with shortcode expansion (emoji, custom tags) in content pipelines.

Worth the install?

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

Renders CommonMark and GitHub Flavored Markdown to HTML or normalized CommonMark via Python bindings to the Rust Comrak parser.

Yes. The package is actively maintained, has no known vulnerabilities, zero runtime dependencies, and offers prebuilt wheels across major platforms and Python versions. It provides a fast, standards-compliant markdown parser with a rich options API. Install it if you need CommonMark/GFM parsing with performance or advanced rendering control; skip it if you need only basic markdown-to-HTML conversion and are comfortable with slower pure-Python alternatives.

Install

comrak on PyPI

pip

pip install comrak

uv

uv add comrak

poetry

poetry add comrak

Installing comrak

Before you install

Medium install friction due to compiled wheels, but prebuilt binaries are available for Python 3.9–3.14 across Linux, macOS, and Windows architectures. Last release 18 days ago; repository is active with recent commits.

License in practice

Licensed under permissive terms (2-Clause BSD per the description); no restrictions on commercial or proprietary use.

Quickstart

pip install comrak
import comrak
html = comrak.render_markdown("# Hello")
commonmark = comrak.render_commonmark("- one\n- two")

Requires Python 3.9 or later.

Verify before relying

  • Whether the package's performance claims (15x–60x faster than markdown/markdown2) remain current and reproducible.
  • Whether all comrak 0.54 features are fully exposed or if new Rust library releases introduce gaps.

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 — 18 days since the last release
Last repo commit
First released
Downloads 284,097/month — #8,067 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: comrak-0.0.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; comrak-0.0.16-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl; comrak-0.0.16-cp311-abi3-macosx_10_12_x86_64.whl; comrak-0.0.16-cp311-abi3-macosx_11_0_arm64.whl; comrak-0.0.16-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; comrak-0.0.16-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl; comrak-0.0.16-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; comrak-0.0.16-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl; comrak-0.0.16-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; comrak-0.0.16-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl; comrak-0.0.16-cp314-abi3-win32.whl; comrak-0.0.16-cp314-abi3-win_amd64.whl; comrak-0.0.16-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; comrak-0.0.16-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl; comrak-0.0.16-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; comrak-0.0.16-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; comrak-0.0.16-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; comrak-0.0.16-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl; comrak-0.0.16-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; comrak-0.0.16-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl

Keywords: markdown, html, rust, commonmark, gfm, parser

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: RustTyping :: Typed

Tags

markdown to html parsercommonmark gfm rendererfast markdown parsingrust markdown bindingsmarkdown processor python
markdown-parserrust-bindings

More Markup packages