A straightforward expense tracker that keeps you honest about your spending.
I kept wondering where my money went each month. Sound familiar? So I built something simple - set a budget, log what you spend, get a warning when you're close to going over. Nothing fancy, but it works.
Windows:
- Download from python.org
- Check "Add Python to PATH" during setup
- Install
Mac/Linux:
python3 --version- Python by Microsoft
- Pylance by Microsoft
VS Code:
- Open the folder with
pyledger.py - Click the play button
- Follow the prompts
Terminal:
python pyledger.py
# or
python3 pyledger.py========================================
MENU:
1. Add Expense
2. View Expenses
3. Show Summary
4. Set/Change Budget
5. Exit
========================================
PyLedger
Track your expenses wisely!
Welcome! Let's set your budget first.
SET BUDGET
Enter your budget amount: $500
Budget set to $500.00
ADD EXPENSE
Enter date (or press Enter for today):
Categories: Food, Transport, Entertainment, Shopping, Bills, Other
Enter category: Food
Enter amount: $45.50
Expense added: Food - $45.50
You have $454.50 remaining in your budget.
This is the part that keeps you in check:
| Status | What It Means |
|---|---|
| Safe | You're good, money left in the budget |
| Caution | You've used 90%+ of your budget |
| Over Budget | Time to stop spending |
Everything saves to two files in the same folder:
expenses.csv- All your expensesbudget.txt- Your budget amount
Want to start fresh? Just delete these files.
"Python not recognized" Reinstall Python and check "Add to PATH"
Data not saving? Make sure you have permission to write files in that folder
Want to reset everything?
Delete expenses.csv and budget.txt, then run the app again
If you're curious about the code:
- Uses Python's
csvmodule for storing expenses datetimefor handling dates- Simple file I/O for the budget
- Basic input validation so it doesn't crash on weird inputs
Keep track of your money. Future you will thank you.