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*")
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*")
mistune
A fast pure-Python parser with a plugin system and sane defaults.
fast
import mistune
html = mistune.html("# Hello *world*")
mistletoe
A pure-Python, CommonMark-compliant parser designed to be easy to extend with custom renderers.
CommonMarkrenderers
import mistletoe
html = mistletoe.markdown("# Hello *world*")