Python

Markdown libraries for Python, from the long-standing reference implementation to fast modern parsers. Back to the overview.

Python-Markdown

The long-standing reference implementation, with a rich extension API.

extensions
import markdown

html = markdown.markdown("# Hello *world*")

View Python-Markdown →

markdown-it-py

A faithful port of markdown-it — CommonMark-compliant and pluggable.

CommonMarkplugins
from markdown_it import MarkdownIt

md = MarkdownIt()
html = md.render("# Hello *world*")

View markdown-it-py →

mistune

A fast pure-Python parser with a plugin system and sane defaults.

fast
import mistune

html = mistune.html("# Hello *world*")

View mistune →

mistletoe

A pure-Python, CommonMark-compliant parser designed to be easy to extend with custom renderers.

CommonMarkrenderers
import mistletoe

html = mistletoe.markdown("# Hello *world*")

View mistletoe →