See our about page.
It is recommended to install dependencies for this project in a virtual environment. Python 3 comes with venv
, while Python 2 needs virtualenv
. Instructions here are from Flask's docs.
On Unix machines, run the following in the project folder:
$ mkdir venv
$ python3 -m venv venv
On Windows, run the following in the project folder (Powershell):
> mkdir venv
> py -3 -m venv venv
If you are using Python 2, run this instead:
$ mkdir venv
$ python2 -m virtualenv venv
Before installing dependencies, activate the created environment:
$ . venv/bin/activate
On Windows:
> venv\Scripts\activate
Within the activated environment, run the following command to install dependencies (Windows/Unix):
$ pip install -r requirements.txt
This will install Flask with optional dependencies in your activated environment. If you do not need optional dependencies listed in the requirements file, you can edit requirements.txt
before installing.
If you are running the application for the first time, you will need to initialize the database. Run the following within venv
to initialize the database:
$ flask init-db
With the database initialized, launch the application within venv
with
$ export FLASK_APP=flaskr
$ flask run
This release uses Flask's built-in server, but it is recommended to use a production container like Gunicorn
.