A simple command-line tool to track your weekly or monthly expenses by category. This Python script helps you keep track of your spending habits and view summaries of your expenses.
- Track expenses by category (Food, Transportation, Housing, etc.)
- Switch between weekly and monthly budget views
- View expense summaries with totals per category
- Simple command-line interface
- Persistent data storage (saves to JSON file)
- Support for multiple currencies
- Python 3.6+
- No external dependencies required
- Clone the repository or download the
budget_calculator.pyfile - Make the script executable (optional):
chmod +x budget_calculator.py
python budget_calculator.py add <amount> <category> [--description "Description"]Example:
python budget_calculator.py add 1500 Food --description "Weekly groceries"python budget_calculator.py summary [--period weekly|monthly]python budget_calculator.py set-period weekly
# or
python budget_calculator.py set-period monthly- Food
- Transportation
- Housing
- Utilities
- Entertainment
- Shopping
- Others
-
Set your budget period to weekly:
python budget_calculator.py set-period weekly
-
Add some expenses:
python budget_calculator.py add 1200 Food python budget_calculator.py add 500 Transportation python budget_calculator.py add 3000 Housing
-
View your weekly summary:
python budget_calculator.py summary
Your expense data is stored in a budget_data.json file in the same directory as the script. You can back up this file or move it to another location if needed.
You can modify the categories list in the script to add or remove expense categories as needed.
Contributions are welcome! Feel free to submit issues or pull requests.
This project is open source and available under the MIT License.