Create a personal budget to track your spending and income!
This budget package allows anyone to create a yearly budget to keep track of their spending and their income over the course of the year.
The package includes two classes, the Budget class and the PersonalBudget class.
The Budget allows the user to initialize their budget, check the budget balance and add income on a certain date.
The PersonalBudget class includes the following categories:
- Food
- Groceries
- Bills
- Entertainment
- Transportation
- Health
- Shopping
- Gifts
- Other
The PersonalBudget class allows the user set monthly limits to spending in each category, add purchases to specific categories on specific dates, add income on specific dates, check the budget balance, and create Pandas dataframes that output the income earned throughout the year and the spending in each category throughout the year.
To install budget_sds271, run the following commands in the terminal:
git clone https://github.com/anabelmf1/budget_sds271.git
cd /path/to/repo
pip install .
pip install -r requirements.txtfrom budget_sds271.budget import Budget
from budget_sds271.budget import Personal_Budget
demo_budget = Budget("Demo Budget", 2025, 1000)
demo_personal_budget = Personal_Budget("Demo Personal Budget", 2025, 1000)
demo_budget.add_income(100, date(2025, 12, 9))
demo_budget.check_balance()
# Set monthly category budgets in the order Food, Groceries, Bills, Entertainment, Transportation, Health, Shopping, Gifts, Other
demo_personal_budget.set_monthly_cat_budget(
demo_personal_budget.budget_cats_list,
amount=[200, 150, 100, 50, 50, 50, 25, 25, 25]
)
# Add purchase to the "Food" category
demo_personal_budget.add_purchase(75, "Food", date(2025, 12, 9))
# Return tables of purchases and income
purchase_disp, income_disp = demo_personal_budget.display_budget()
# Plotting
demo_personal_budget.plot_income()
demo_personal_budget.plot_purchases()budget_sds271 was created by Hannah Hafner and Anabel Fletcher. It is licensed under a MIT license.
Created by Hannah Hafner and Anabel Fletcher for their final project in SDS271 - Programming for Data Science in Python at Smith College.