Book Image

Flask Blueprints

By : Joel Perras
Book Image

Flask Blueprints

By: Joel Perras

Overview of this book

Table of Contents (14 chapters)

Getting started


To make sure we start things correctly, let's create a folder where this project will exist and a virtual environment to encapsulate any dependencies that we will require:

$ mkdir -p ~/src/snap && cd ~/src/snap
$ mkvirtualenv snap -i flask

This will create a folder called snap at the given path and take us to this newly created folder. It will then create the snap virtual environment and install Flask in this environment.

Note

Remember that the mkvirtualenv tool will create the virtual environment, which will be the default set of locations to install the packages from pip, but the mkvirtualenv command does not create the project folder for you. This is why we will run a command to create the project folder first and then create the virtual environment. Virtual environments, by virtue of the $PATH manipulation that is performed after the environments are activated, are completely independent of the location of your project files in the file system.

We will then create...