Pnogo API
To use the API you need to install the dependencies specified inside requirements.txt. You can quickly install them using PIP:
pip install -r requirements.txtThe same can be done on Windows by opening the included install.bat file.
To start the API we need to first define some environment variables used by Flask. By setting the FLASK_ENV variable to development we enable some very useful functionalities, such as auto refresh on save (so we don't need to reopen Flask every time we edit the code) and the included debugger.
This can be done in Windows using set, while on linacs export must be used. For example, in Windows:
set FLASK_APP=run
set FLASK_ENV=developmentThen, from the root of the project, we need to enter the directory pnogo_api, where the code is:
cd pnogo_apiFinally, we can start serving the API using Flask by giving the following command:
python -m flask runA start.bat has been included to ease development when using Windows.