A simple yet powerful command-line tool to track, manage, and analyze personal expenses using Python.
- Python 3.x
- No external dependencies — uses only built-in Python modules (
argparse
,json
,csv
,datetime
,os
)
- Add new expenses with description, amount, date, and category
- Update existing expense entries
- Delete expenses by ID
- View all expenses or filter by category
- Get a summary of total expenses
- View monthly expense summary (current year)
- Set and track monthly budgets — get a warning if exceeded
- Export all expense records to CSV
- Input validations for negative amounts, invalid dates, and missing fields
- How to structure a command-line application with
argparse
- How to store and retrieve data using JSON files
- How to build reusable functions and handle edge cases
- How to read/write CSV files with the
csv
module - How to build real-world projects using only core Python
-
Download or Clone the Repository
- Download ZIP via Code > Download ZIP
- Or clone using Git:
git clone https://github.com/anu-techie/expense_tracker_cli.git
-
Navigate to Project Directory
cd expense-tracker_cli
-
Ensure you have Python 3 & installed
python --version
If Python is not installed, download it from python.org.
-
Run the Task Tracker CLI
python expense_tracker.py --help
To see available commands
-
expense_file.json
– Stores all expense records -
budget_file.json
– Stores budget information per month -
expenses_export.csv
– Exported file for reports/sharing
For detailed project guidelines and ideas, visit: https://roadmap.sh/projects/expense-tracker
This project was inspired by and developed following the excellent guidance from roadmap.sh. Special thanks to their clear tutorials and project ideas.
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
You can view the full license here.
🙋♀️ Author : Anusuyadevi | Learning Python building cool projects ❤️