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('README.md', 'r') as f:
    markdown = f.read()

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

API

Additional Information

Index

License

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