Book Image

Flask Blueprints

By : Joel Perras
Book Image

Flask Blueprints

By: Joel Perras

Overview of this book

Table of Contents (14 chapters)

Setting up the application


Once again, let's set up a barebones folder for our project along with the associated virtual environment in order to isolate our application dependencies:

$ mkdir –p ~/src/dinnerly
$ mkvirtualenv dinnerly
$ cd ~/src/dinnerly

Once created, let's install the basic packages that we will require including Flask itself along with the Flask-OAuthlib extension, our trusty friend Flask-SQLAlchemy, and Flask-Login, which we used in a previous chapter:

$ pip install flask flask-oauthlib flask-sqlalchemy flask-login flask-wtf

We'll utilize our trusty Blueprint-based application structure that has served us so well in the past chapters to ensure a solid foundation. For now, we'll have a single users Blueprint where the OAuth handling will be taken care of:

-run.py
-application
 ├── __init__.py
 └── users
     ├── __init__.py
     ├── models.py
    └── views.py

Once the very basic folder and file structure has been established, let's use an application factory to create our...