markdown-it-py
markdown-it-py is a Python port of the popular markdown-it library, providing fast and extensible Markdown parsing with full CommonMark compliance. The current version is 4.0.0, released in August 2025, with a release cadence of approximately one major version per year.
Warnings
- breaking Dropped support for Python 3.8 and 3.9 in version 4.0.0.
- breaking Updated parser to comply with CommonMark 0.31.2 and Markdown-It v14.1.0, which may affect parsing behavior.
- deprecated The use of StateBase.srcCharCode is deprecated; replaced by StateBase.src.
- gotcha The linkify feature requires the optional linkify-it-py dependency.
Install
-
pip install markdown-it-py
Imports
- MarkdownIt
from markdown_it import MarkdownIt
Quickstart
from markdown_it import MarkdownIt md = MarkdownIt() text = "# Hello World\n\nThis is a paragraph with **bold** and *italic* text." html = md.render(text) print(html)