PyMD4C Documentation

Welcome to the full documentation for PyMD4C, Python bindings (plus extras) for the very fast MD4C Markdown parsing and rendering library.

Using it is as simple as:

import md4c

with open('', 'r') as f:
    markdown =

renderer = md4c.HTMLRenderer()
html = renderer.parse(markdown)

In more detail, the underlying MD4C C library provides two things:

  • A SAX-like Markdown parser, meaning it uses callbacks to return the various blocks, inlines, and text it parses, as it parses

  • An HTML renderer, built on top of that parser, to provide HTML output directly

PyMD4C provides Python bindings for both, plus some convenience features built on top. The goal is to provide a simple and fast interface for applications that just need to translate Markdown to HTML, while providing flexibility for applications that need to do more.

Table of Contents

User Manual


Additional Information



PyMD4C is licensed under the MIT license. See the file in the repository for details.