The Python REST backend project build in Docker. It is build using the Flask framework.
If you want to contribute to the project please read our code of conduct and contributing guidelines.
The project requires Python 3.6.x or newer.
Make sure you install the dependencies using pip:
virtualenv gadget
pip install -r requirements.txt
pip install -e .
To (re)create a developer/test DB in SQLite run
flask dev create-db
During this process you will be asked to remove the current database and fill the database with sample data.
To run the project in development mode run:
./run_dev.sh
To run the tests using Pytest run:
pytest tests/
This project uses Flask-Migrate to handle database migrations.
If you need to create a new DB migration run the following command:
flask db migrate -m "<message>"
To apply the migrations to your development database run:
flask db upgrade