This template repository contains a Flask app based RESTful API. The app is structured based on best practices and experience gained through previous implementations. By using a template repository you can generate a new repository with the same directory structure and files to get a new project started quicker.
- Python 3.7.x or higher
- PostgreSQL 11.x or higher
- Redis 4.0.x or higher (for rate limiting, otherwise in-memory storage is used)
sudo service postgresql start
sudo -su postgres
psql
create user mash with password 'mash';
createdb thing;
grant all privileges on database thing to mash;
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt ; pip3 install -r requirements_dev.txt
flask db upgrade
flask run
Run the test suite
python -m pytest --cov=app --cov-report=term-missing --cov-branch