Skip to content

MashSoftware/flask-bootstrap-aio

Repository files navigation

Flask Bootstrap All-in-One Template

ko-fi

Prerequisites

Required

  • Python 3.7.x or higher
  • PostgreSQL 11.x or higher

Optional

  • Redis 4.0.x or higher (for rate limiting, otherwise in-memory storage is used)

Getting started

Create local Postgres database

sudo service postgresql start
sudo -su postgres
psql
create user mash with password 'mash';
createdb thing;
grant all privileges on database thing to mash;

Create venv and install requirements

python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt ; pip3 install -r requirements_dev.txt

Run database migrations

flask db upgrade

Run app

flask run

Testing

Run the test suite

python -m pytest --cov=app --cov-report=term-missing --cov-branch