A powerful Python tool for personal finance management with transaction tracking, category-wise analysis, and CSV export capabilities. Built with SQLite for efficient data storage and Pandas for advanced analytics.
- ๐ณ Transaction Management - Add, view, edit, and delete transactions
- ๐ Category Organization - Organize by income, expenses, or savings
- ๐ Financial Summaries - Monthly and category-wise reports
- ๐ CSV Export - Export data for external analysis
- ๐พ SQLite Database - Reliable, lightweight data storage
- ๐ Data Visualization - Charts and graphs for spending patterns
- ๐ Modular Design - Easy integration with custom applications
- ๐ฏ Developer-Friendly - Clean API for programmatic access
- Python 3.8 or higher
- pip package manager
# Clone the repository
git clone https://github.com/widgetwalker/personal_financer.git
cd personal_financer
# Install dependencies
pip install pandas matplotlib# Run main application
python main.py
# Or use the data handler directly
python data_handler.pypandas>=1.5.0
matplotlib>=3.6.0
sqlite3 (included with Python)
python main.pyFollow the menu prompts to:
- Add new transactions
- View transaction history
- Generate summaries
- Export to CSV
from data_handler import FinanceDataHandler
# Initialize handler
handler = FinanceDataHandler()
# Add transaction
handler.add_transaction(
date="2025-04-20",
amount=100.50,
category="Salary",
type="Income"
)
# Get monthly summary
summary = handler.get_monthly_summary(month="04", year="2025")
# Export to CSV
handler.export_to_csv("transactions.csv")personal_financer/
โโโ main.py # Main application with CLI interface
โโโ data_handler.py # Core transaction management logic
โโโ db_setup.py # Database initialization
โโโ visualizer.py # Data visualization utilities
โโโ finance.db # SQLite database (auto-created)
โโโ finance_tracker.db # Backup database
โโโ README.md # This file
Main class for transaction management:
add_transaction()- Add new transactionget_all_transactions()- Retrieve all recordsupdate_transaction()- Modify existing transactiondelete_transaction()- Remove transactionget_monthly_summary()- Generate monthly reportget_category_summary()- Analyze by categoryexport_to_csv()- Export data
CREATE TABLE transactions (
id INTEGER PRIMARY KEY AUTOINCREMENT,
date TEXT NOT NULL,
amount REAL NOT NULL,
category TEXT NOT NULL,
type TEXT NOT NULL,
description TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);- Income: Salary, Freelance, Investments, Other
- Expenses: Groceries, Utilities, Rent, Entertainment, Transport
- Savings: Emergency Fund, Retirement, Goals
- Monthly: Total income, expenses, and savings per month
- Category-wise: Spending breakdown by category
- Yearly: Annual financial overview
- Custom: Filter by date range or category
- CSV Format: Compatible with Excel, Google Sheets
- Filtered Exports: Export specific date ranges or categories
- Backup: Regular database backups
from visualizer import FinanceVisualizer
viz = FinanceVisualizer()
# Generate spending pie chart
viz.plot_category_distribution()
# Create monthly trend line
viz.plot_monthly_trends()
# Compare income vs expenses
viz.plot_income_vs_expenses()- Monitor daily expenses
- Track income sources
- Analyze spending patterns
- Set category budgets
- Compare actual vs planned spending
- Identify cost-saving opportunities
- Export transaction history
- Categorize deductible expenses
- Generate annual summaries
# Reset database
rm finance.db
python db_setup.py# Reinstall dependencies
pip install --upgrade pandas matplotlib- Check file permissions
- Ensure output directory exists
- Verify data format
- ๐ Web Interface - Browser-based UI with Flask/Django
- ๐ฑ Mobile App - Cross-platform mobile application
- ๐ Recurring Transactions - Auto-add monthly bills
- ๐ฆ Bank Integration - Import transactions from banks
- ๐ Advanced Analytics - Budgeting goals and forecasting
- ๐ Notifications - Alerts for budget limits
- ๐ Multi-currency - Support for multiple currencies
Contributions are welcome! Here's how:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Repository: github.com/widgetwalker/personal_financer
- Issues: Report a bug
- Author: @widgetwalker
Dheeraj Pilli
- GitHub: @widgetwalker
- Email: dheeraj5765483@gmail.com
โญ Star this repo if you find it helpful!
Built with โค๏ธ using Python, SQLite, and Pandas