This project is a simple API that allows you to create, read, update and delete data from sales. The dataset is stored in a file called sales.csv
.
- Python 3.9 or higher
- Clone this repository
- Install the dependencies with
pip install -r requirements.txt
- Run the API with
python main.py
GET /sales
: Returns all salesGET /sales/{invoice_id}
: Returns a sale by its invoice idPOST /sales
: Creates a new salePUT /sales/{invoice_id}
: Updates a sale by its invoice idDELETE /sales/{invoice_id}
: Deletes a sale by its invoice id
All endpoints are public available at https://data-processing-dataset-api-1.onrender.com
This project also contains a script to test the deployed API. You can run it with python ./resources/script.py
.
Change the API_URL
variable to test the API locally.
Change the invoice_id to test the GET /sales/{invoice_id}
, PUT /sales/{invoice_id}
and DELETE /sales/{invoice_id}
endpoints.