Skip to content

lawal-hash/ExpenseTracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expense Tracker

Build-sphinx-docs CodeQLpages-build-deployment

ExpenseTracker, a Python application, assesses and highlights object-oriented programming (OOP) skills in financial expense management. Comprising two pivotal classes, Expense and ExpenseDB, it models individual expenses with attributes like a unique identifier, title, amount, and timestamps in Coordinated Universal Time (UTC). The Expense class features methods for updating details, and efficient conversion to a dictionary. As a manager for Expense objects, the ExpenseDB class facilitates addition, removal, retrieval of expenses.

Run Locally

Clone the project

  git clone https://github.com/lawal-hash/ExpenseTracker.git

Install dependencies

  pip install poetry
  cd ExpenseTracker
  poetry install --no-root
  poetry shell

Usage/Examples

from src.expense import Expense
from src.expensedb import ExpenseDatabase


def main():
    expense_one = Expense(title="Spain", amount=80.00)
    expense_two = Expense(title="UK", amount=180.00)
    expense_three = Expense(title="Malaga", amount=300.00)


    expense_db = ExpenseDatabase()

    for expense in [expense_one, expense_two, expense_three]:
        expense_db.add_expense(expense)

if __name__ == "__main__":
    main()
python main.py

License

MIT