Building Serverless Python Web Services with Zappa
上QQ阅读APP看书,第一时间看更新

Flask extensions

Flask is a microframework, but it has an extensible nature wherein you can add more features as per your needs. To develop a Todo application, we may need some basic features such as data persistence and a user authentication mechanism. So, while working on a Flask application, we are going to use some Flask extensions.

The Flask registry provides numerous extensions, which are standalone packages, and you can easily configure them with your Flask application instance. You can see the complete list of Flask extensions at: http://flask.pocoo.org/extensions/.

We are going to use the following Flask and Flask extensions packages:

  • Flask==0.12.2
  • Flask-Login==0.4.0
  • Flask-SQLAlchemy==2.3.2
  • Flask-WTF==0.14.2
  • Flask-Migrate==2.1.1

I would recommend listing these packages in a separate file named requirements.txt and then installing them in one go, as follows:

pip install -r requirements.txt

This will install all of the listed packages with their dependencies.