Skip to content

API built in django framework. It manages economic transactions of a database.

Notifications You must be signed in to change notification settings

vaszig/money_handler_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Money Handler API

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.

How to setup

Install the requirements

pip install -r requirements

Run the migrations

python manage.py migrate

How to run

python manage.py runserver

How to run tests

python manage.py test

CI/CD - Github action

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)

Usage

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)

About

API built in django framework. It manages economic transactions of a database.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published