In this recipe, you'll build your first Flask application in 10 minutes or less. Flask is a Python microframework that you can use to create simple web-based applications very quickly. Visit http://flask.pocoo.org/ for all the details.
In this recipe, we're going to keep it simple; however, included with the book is a fully functional Flask application chock-full of the latest JavaScript libraries and CSS themes, ready for customization.
In order to write Flask applications, you first need to install it. If you have the Anaconda distribution of Python, you'll already have it. Just in case you don't, open a terminal and run the following:
pip install flask
To be able to pull data directly from MongoDB later on, install the flask-mongoengine
library with this command:
pip install flask-mongoengine
Now let's build that first application.