This extension to Python-Markdown enables to use Jinja2 markup in markdown documents.
This module can installed using pip
:
$ pip install markdown-jinja
JinjaMarkdown can be passed as a standard extension to Python-Markdown:
import markdown
from markdown_jinja import JinjaMarkdown
html = markdown.markdown(text, extensions=[JinjaMarkdown(context_file='path/to/context.json')])