REST API to track blood glucose levels
Requires Postgres and built with Python 3.8
-
Create and activate a virtual environment and Clone the project
https://github.com/peterwade153/gluco.git
-
Move into the project folder
$ cd gluco
-
Install dependencies
$ pip install -r requirements.txt
-
Create a
.env
file from the.env.sample
file. Replace the variables in the sample file with the actual variables, such the database credentials, secret key etc. leaving theENV_VAR_FILE
as it is for local testing. -
Run migrations
python manage.py migrate
-
Start server
python manage.py runserver
-
The application can be accessed via swagger docs here http://127.0.0.1:8000/
-
Populate Database with sample data
python manage.py populate
Request | Endpoints | Functionality |
---|---|---|
GET | /api/v1/levels/ |
Glucose levels. |
GET by ID | /api/v1/levels/123 |
Glucose level entry by ID. |
GET Ordering | /api/v1/levels/?ordering=id |
Ordering based on (id, user_id, seriennummer, gerätezeitstempel) |
GET limit result | /api/v1/levels/?size=5 |
Limit return size of results |
GET page | /api/v1/levels/?page=5 |
Results on page 5 |
GET filter | /api/v1/levels/?start=2021-02-02T03:03:00Z&stop=2021-11-02T03:03:00Z |
Filter by start date to stopdate |