Mistune Markdown Parser

3.2.0 · active · verified Wed Apr 08

Mistune is a sane and fast Markdown parser for Python, offering various useful plugins and renderers. It is actively maintained, with the current version being 3.2.0, and receives regular updates to support newer Python versions and fix bugs.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates the simplest way to convert Markdown text to HTML using the `mistune.html()` function, which provides a default setup with many common features enabled.

import mistune

markdown_text = """
# Hello, Mistune!

This is **bold** text and `code`.

- Item 1
- Item 2
"""

html_output = mistune.html(markdown_text)
print(html_output)

view raw JSON →