This is a college assignment with the objective of make the payments of a restaurant with Internet of Things concepts.
This repo it's the backend that provides a restful api for the other projects to access/create the data.
-
GET /api/clients/ (queryparams=rfid, cpf)
-
GET /api/transactions/ (queryparams=client_id)
-
POST /api/clients
{
"cpf": "00000000000",
"rfid": "3789384224",
"name": "Andre Macedo",
}
- POST /api/make_transaction
{
"value": -10,
"rfid": "3789384224"
}
With conda
conda create --name venv --file requirements.txt
First set up your env by copying .env.example to .env and giving the values of the variables
Than create your database and follow the following steps:
conda activate venv
python manage.py migrate
python manage.py runserver
Then access http://127.0.0.1:8000/api/