📊 Expense Tracker (Python + SQLite)
A simple Python-based Expense Tracker that stores expenses in a SQLite database and generates reports such as totals, category-wise expenses, monthly expenses, and daily summaries.
A Jupyter Notebook is included for analysis and visualizations.
🚀 Features
📌 Core Features
✔ Add new expenses
✔ View all expenses
✔ Delete or update an expense
✔ Reports:
Total expenses
Expenses grouped by category
Monthly expenses
Daily expenses
✔ Load expense data into pandas DataFrame
✔ Generate charts using matplotlib (inside notebook)
Expense-Tracker/
├─ images/
│ └─ outputimages.png
├─ src/
│ ├─ database.py
│ ├─ expenses.py
│ └─ reports.py
├─ notebooks/
│ └─ analysis.ipynb
├─ README.md
├─ requirements.txt
└─ .gitignore
🔧 Requirements
pandas
matplotlib
▶️ How to Run
1️⃣ Install dependencies
pip install -r requirements.txt
2️⃣ Run the Jupyter notebook for analysis
jupyter notebook notebooks/analysis.ipynb
3️⃣ How database works
The SQLite database file expenses.db is automatically created at the project root.
Tables are created using create_tables() inside database.py.
📄 Module Overview
database.py
Creates database file
Creates table expenses if not exists
Provides database connection function
expenses.py
Add expense
Fetch all expenses
Fetch expenses by category
Delete an expense
Update an expense
reports.py
Total expenses
Category-wise totals
Monthly totals
Daily totals
📈 Visualization (inside notebook)
The Jupyter notebook includes:
Bar chart of expense categories
Monthly trend line chart
Daily expense trend
⭐ Support
If you find this project helpful, please ⭐ star the repository!