API built in Django framework for economic transactions management. It creates and modifies income and expenses based on date and type of each category. It has been built with minimum third party libraries (without using DRF) and without implementing user authentication.
Install the requirements
pip install -r requirements
Run the migrations
python manage.py migrate
python manage.py runserver
python manage.py test
There is a CI/CD pipeline on every push to master branch which tests the code, pushes it to dockerhub and deploys it to heroku if the all previous jobs have passed. The file cicd.yml must be in the root of the project (/.github/workflows/cicd.yml)
API can be used via https://money-handler-api.herokuapp.com/ (It returns the current balance) The following urls can be used:
POST Request
- admin/
admin page (accessed by an admin user) - add/
adds an income or an expense based on a positive or negative amount(required fields: amount, category, transaction_at in json format) - update/
updates an existing income or expense (required fields: id, amount, category, transaction_at in json format) - delete/
deletes an existing income or expense (required fields: id in json format)
GET Request
- get/income
fetches total income from a date range given (required fields: start_date, end_date in json format) - get/expenses
fetches total expenses from a date range given (required fields: start_date, end_date in json format) - get/transactions
fetches all transactions from a given date or category (optional fields: transaction_at, category in json format)