Follow the following instructions to get the project ready to use ASAP:
Be sure you have installed in your system
- Python version 3 in your path. It will install automatically pip as well.
- A virtual environment, namely venv.
-
Create and activate the environment,
In Windows:
python -m venv .venv .venv\Scripts\activate.bat
In Unix based operative systems:
virtualenv .venv source .venv/bin/activate
-
Install the requirements:
python3 -m pip install -r requirements/prod.txt
Remember to do it with Python 3.
-
Set the env var
FLASK_APP
totime_tracker_api
and start the app:In Windows
set FLASK_APP=time_tracker_api flask run
In Unix based operative systems:
export FLASK_APP=time_tracker_api flask run
-
Open
http://127.0.0.1:5000/
in a browser. You will find in the presented UI a link to the swagger.json with the definition of the api.
There are available commands aware of the API that can be verify useful for you. You can check them out by running
python cli.py
If you want to run an specific command, e.g. gen_swagger_json
, specify it as a param
as well as its correspondent options.
python cli.py gen_swagger_json -f ~/Downloads/swagger.json