The Una health test application consists of three models - User, Device, and GlucoseLevel using DRF and Postgresql.
Following is the API list which sample application provides:
- POST API (api/v1/data) with reads data from csv (Try in postman which takes input as csv file)
- GET API (api/v1/levels) returns data of glucose levels in DB
- GET API (api/v1/levels/) return data of glucose level of specified in API
- Python 3.12
- Django
- Postgres DB
- Docker
- Create python virtual environment.
python3 -m venv .venv
- Install dependencies
pip install -r requirements.txt
- Create .env file in Project same as .env.template format and replace Database credentials in it.
- Run the project
python manage.py runserver
- Running testcases
python manage.py test glucose
- Build
docker compose up --build
- Migrate
docker exec -it <container-id> python manage.py migrate
- Using ruff
ruff format . ruff check .
- Using Black
black .
- Using isort
isort . --profile black