skip to navigation
skip to content

Flask-FlatPages-Knitr 0.3

Knitr preprocessing for Flask-FlatPages

Latest Version: 0.3.1

Flask-FlatPages-Knitr preprocesses a Flask FlatPage using knitr such that code chunks are evaluated before the next step in the rendering process occurs.


First, install the knitr R package:

Rscript -e "install.packages('knitr')"

Right now, Flask-FlatPages-Knitr requires at least version 0.6 of Flat-FlatPages, which has not been released yet. Hence, you’ll have to install it from Github:

pip install git+git://

Second, install Flask-FlatPages-Knitr from the Python Package Index:

pip install Flask-FlatPages-Knitr

Finally, you can simply add Flask-FlatPages-Knitr to your app:

from flask import Flask
from flask_flatpages import FlatPages
from flask_flatpages_knitr import FlatPagesKnitr

app = Flask(__name__)

pages = FlatPages(app)

By default, FLATPAGES_HTML_RENDERER will be reused, which defaults to a Markdown implementation for Python. For more advanced Markdown rendering, Flask-FlatPages-Pandoc is recommended:

from flask_flatpages_pandoc import FlatPagesPandoc


pages = FlatPages(app)
FlatPagesPandoc("markdown", "app", ["--mathjax"], pre_render=True)
File Type Py Version Uploaded on Size
Flask-FlatPages-Knitr-0.3.tar.gz (md5) Source 2014-05-25 3KB