expense-tracker-python

Personal Expense Tracker

A simple command-line application to track expenses. This application allows users to add, view, delete expenses, and generate reports on their spending habits. It uses a JSON file to store data and matplotlib to visualize expense distribution.

Features

Requirements

Installation

  1. Clone the Repository:

    git clone https://github.com/Atpswift/expense-tracker-python.git
    
    
  2. Navigate to the Project Directory:

    cd expense-tracker
    
    
  3. Install Dependencies:

    pip install -r requirements.txt
    
    

Usage

  1. Run the application:

    python expense_tracker.py
    
    
  2. Follow the On-Screen Instructions:

    • Add an Expense: Enter the amount, category, date (or leave blank for today), and description.

    • View Expenses: Filter by category or view all expenses.

    • Delete an Expense: Provide the index of the expense you want to delete.

    • Generate a Report: View a bar chart of expenses categorized by type.

Code Overview

Manual Testing

I performed the following tests to validate functionality of the program:

  1. Add Expense: Verified that expenses are added and saved correctly.

  2. View Expenses: Ensured all expenses are displayed and filtering works.

  3. Delete Expense: Confirmed that the correct expense is deleted and the list updates.

  4. Generate Report: Checked that the bar chart accurately represents expense distribution.

Deployment

You can see the deployment here: https://python-expense-tracker896-f8aa49a1c241.herokuapp.com/