Install
pip install patitas
Requires Python 3.14 or later. See installation for alternative methods.
Parse Markdown
from patitas import parse, render
# Parse to typed AST
doc = parse("# Hello **World**")
# Render to HTML
html = render(doc, source="# Hello **World**")
print(html)
# Output: <h1>Hello <strong>World</strong></h1>
All-in-One
from patitas import Markdown
md = Markdown()
html = md("# Hello **World**")
print(html)
# Output: <h1>Hello <strong>World</strong></h1>
What's Next?
Quickstart
Start Here
Complete walkthrough in 2 minutes
Parse, render, and explore the AST.
Syntax Guide
Markdown syntax reference
Learn inline, blocks, links, and code.
Directives
MyST-style extensions
Add admonitions, tabs, and dropdowns.
Quick Links
- API Reference — parse, render, Markdown class
- Inline Syntax — emphasis, links, code
- Architecture — lexer, parser, renderer