budgetwise-srini 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- budgetwise_srini-1.0.0/PKG-INFO +42 -0
- budgetwise_srini-1.0.0/README.md +34 -0
- budgetwise_srini-1.0.0/budget_pkg/ActualTask.py +116 -0
- budgetwise_srini-1.0.0/budget_pkg/__init__.py +10 -0
- budgetwise_srini-1.0.0/budgetwise_srini.egg-info/PKG-INFO +42 -0
- budgetwise_srini-1.0.0/budgetwise_srini.egg-info/SOURCES.txt +10 -0
- budgetwise_srini-1.0.0/budgetwise_srini.egg-info/dependency_links.txt +1 -0
- budgetwise_srini-1.0.0/budgetwise_srini.egg-info/entry_points.txt +2 -0
- budgetwise_srini-1.0.0/budgetwise_srini.egg-info/top_level.txt +2 -0
- budgetwise_srini-1.0.0/main.py +145 -0
- budgetwise_srini-1.0.0/pyproject.toml +20 -0
- budgetwise_srini-1.0.0/setup.cfg +4 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: budgetwise-srini
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Smart Personal Budget Planner using Python
|
|
5
|
+
Author: Srinivasan D
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
|
|
9
|
+
# BudgetWise – Smart Personal Budget Planner
|
|
10
|
+
|
|
11
|
+
BudgetWise is a Python-based personal budget management application.
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
- Set monthly budget.
|
|
15
|
+
- Add and manage expenses.
|
|
16
|
+
- View remaining budget.
|
|
17
|
+
- Category-wise expense analysis.
|
|
18
|
+
- Overspending alerts.
|
|
19
|
+
- Calculate savings.
|
|
20
|
+
- Generate monthly reports.
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pip install budgetwise-srini
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Run the Application
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
budgetwise
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Technologies Used
|
|
35
|
+
- Python
|
|
36
|
+
- User-defined Python packages
|
|
37
|
+
- Lists and dictionaries
|
|
38
|
+
- Functions
|
|
39
|
+
- Exception handling
|
|
40
|
+
|
|
41
|
+
## Author
|
|
42
|
+
Srinivasan D
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# BudgetWise – Smart Personal Budget Planner
|
|
2
|
+
|
|
3
|
+
BudgetWise is a Python-based personal budget management application.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
- Set monthly budget.
|
|
7
|
+
- Add and manage expenses.
|
|
8
|
+
- View remaining budget.
|
|
9
|
+
- Category-wise expense analysis.
|
|
10
|
+
- Overspending alerts.
|
|
11
|
+
- Calculate savings.
|
|
12
|
+
- Generate monthly reports.
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pip install budgetwise-srini
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Run the Application
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
budgetwise
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Technologies Used
|
|
27
|
+
- Python
|
|
28
|
+
- User-defined Python packages
|
|
29
|
+
- Lists and dictionaries
|
|
30
|
+
- Functions
|
|
31
|
+
- Exception handling
|
|
32
|
+
|
|
33
|
+
## Author
|
|
34
|
+
Srinivasan D
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
|
|
2
|
+
# BUDGETWISE - PERSONAL BUDGET PLANNER
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
# Function 1: Set Monthly Budget
|
|
6
|
+
|
|
7
|
+
def set_budget(amount):
|
|
8
|
+
|
|
9
|
+
if amount <= 0:
|
|
10
|
+
raise ValueError("Budget must be greater than zero.")
|
|
11
|
+
|
|
12
|
+
return amount
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Function 2: Add Expenses
|
|
16
|
+
|
|
17
|
+
def add_expense(expenses, category, amount):
|
|
18
|
+
|
|
19
|
+
if not category.strip():
|
|
20
|
+
raise ValueError("Category cannot be empty.")
|
|
21
|
+
|
|
22
|
+
if amount <= 0:
|
|
23
|
+
raise ValueError("Expense must be greater than zero.")
|
|
24
|
+
|
|
25
|
+
expenses.append({
|
|
26
|
+
"category": category.title(),
|
|
27
|
+
"amount": amount
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
return expenses
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# Function 3: Calculate Total Expenses
|
|
34
|
+
|
|
35
|
+
def total_expenses(expenses):
|
|
36
|
+
|
|
37
|
+
total = 0
|
|
38
|
+
|
|
39
|
+
for expense in expenses:
|
|
40
|
+
total += expense["amount"]
|
|
41
|
+
|
|
42
|
+
return total
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
# Function 4: Calculate Remaining Budget
|
|
46
|
+
|
|
47
|
+
def remaining_budget(budget, expenses):
|
|
48
|
+
|
|
49
|
+
if budget <= 0:
|
|
50
|
+
raise ValueError("Invalid budget.")
|
|
51
|
+
|
|
52
|
+
return budget - total_expenses(expenses)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
# Function 5: Overspending Alert
|
|
56
|
+
|
|
57
|
+
def overspending_alert(budget, expenses):
|
|
58
|
+
|
|
59
|
+
spent = total_expenses(expenses)
|
|
60
|
+
|
|
61
|
+
if spent > budget:
|
|
62
|
+
return "WARNING! You have exceeded your budget."
|
|
63
|
+
|
|
64
|
+
elif spent == budget:
|
|
65
|
+
return "Your entire budget has been used."
|
|
66
|
+
|
|
67
|
+
else:
|
|
68
|
+
return "Good! You are within your budget."
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# Function 6: Category-wise Analysis
|
|
72
|
+
|
|
73
|
+
def category_analysis(expenses):
|
|
74
|
+
|
|
75
|
+
analysis = {}
|
|
76
|
+
|
|
77
|
+
for expense in expenses:
|
|
78
|
+
|
|
79
|
+
category = expense["category"]
|
|
80
|
+
|
|
81
|
+
if category in analysis:
|
|
82
|
+
analysis[category] += expense["amount"]
|
|
83
|
+
|
|
84
|
+
else:
|
|
85
|
+
analysis[category] = expense["amount"]
|
|
86
|
+
|
|
87
|
+
return analysis
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
# Function 7: Calculate Savings
|
|
91
|
+
|
|
92
|
+
def calculate_savings(income, expenses):
|
|
93
|
+
|
|
94
|
+
if income < 0:
|
|
95
|
+
raise ValueError("Income cannot be negative.")
|
|
96
|
+
|
|
97
|
+
return income - total_expenses(expenses)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
# Function 8: Generate Monthly Report
|
|
101
|
+
|
|
102
|
+
def monthly_report(budget, expenses):
|
|
103
|
+
|
|
104
|
+
spent = total_expenses(expenses)
|
|
105
|
+
|
|
106
|
+
remaining = remaining_budget(budget, expenses)
|
|
107
|
+
|
|
108
|
+
analysis = category_analysis(expenses)
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
"budget": budget,
|
|
112
|
+
"total_expenses": spent,
|
|
113
|
+
"remaining": remaining,
|
|
114
|
+
"categories": analysis,
|
|
115
|
+
"status": overspending_alert(budget, expenses)
|
|
116
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: budgetwise-srini
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Smart Personal Budget Planner using Python
|
|
5
|
+
Author: Srinivasan D
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
|
|
9
|
+
# BudgetWise – Smart Personal Budget Planner
|
|
10
|
+
|
|
11
|
+
BudgetWise is a Python-based personal budget management application.
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
- Set monthly budget.
|
|
15
|
+
- Add and manage expenses.
|
|
16
|
+
- View remaining budget.
|
|
17
|
+
- Category-wise expense analysis.
|
|
18
|
+
- Overspending alerts.
|
|
19
|
+
- Calculate savings.
|
|
20
|
+
- Generate monthly reports.
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pip install budgetwise-srini
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Run the Application
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
budgetwise
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Technologies Used
|
|
35
|
+
- Python
|
|
36
|
+
- User-defined Python packages
|
|
37
|
+
- Lists and dictionaries
|
|
38
|
+
- Functions
|
|
39
|
+
- Exception handling
|
|
40
|
+
|
|
41
|
+
## Author
|
|
42
|
+
Srinivasan D
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
main.py
|
|
3
|
+
pyproject.toml
|
|
4
|
+
budget_pkg/ActualTask.py
|
|
5
|
+
budget_pkg/__init__.py
|
|
6
|
+
budgetwise_srini.egg-info/PKG-INFO
|
|
7
|
+
budgetwise_srini.egg-info/SOURCES.txt
|
|
8
|
+
budgetwise_srini.egg-info/dependency_links.txt
|
|
9
|
+
budgetwise_srini.egg-info/entry_points.txt
|
|
10
|
+
budgetwise_srini.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
|
|
2
|
+
# BUDGETWISE - MAIN PROGRAM
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
from budget_pkg import (
|
|
6
|
+
set_budget,
|
|
7
|
+
add_expense,
|
|
8
|
+
remaining_budget,
|
|
9
|
+
overspending_alert,
|
|
10
|
+
category_analysis,
|
|
11
|
+
calculate_savings,
|
|
12
|
+
monthly_report
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def display_banner():
|
|
17
|
+
|
|
18
|
+
print("\n")
|
|
19
|
+
print("=" * 55)
|
|
20
|
+
print(" BUDGETWISE")
|
|
21
|
+
print(" SMART PERSONAL BUDGET PLANNER")
|
|
22
|
+
print("=" * 55)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def main():
|
|
26
|
+
|
|
27
|
+
display_banner()
|
|
28
|
+
|
|
29
|
+
expenses = []
|
|
30
|
+
|
|
31
|
+
try:
|
|
32
|
+
|
|
33
|
+
income = float(input("\nEnter your monthly income: ₹"))
|
|
34
|
+
|
|
35
|
+
budget = float(input("Enter your monthly budget: ₹"))
|
|
36
|
+
|
|
37
|
+
budget = set_budget(budget)
|
|
38
|
+
|
|
39
|
+
if income < 0:
|
|
40
|
+
raise ValueError("Income cannot be negative.")
|
|
41
|
+
|
|
42
|
+
except ValueError as error:
|
|
43
|
+
|
|
44
|
+
print("Invalid input:", error)
|
|
45
|
+
return
|
|
46
|
+
|
|
47
|
+
while True:
|
|
48
|
+
|
|
49
|
+
print("\n")
|
|
50
|
+
print("1. Add Expense")
|
|
51
|
+
print("2. View Remaining Budget")
|
|
52
|
+
print("3. Category-wise Analysis")
|
|
53
|
+
print("4. Overspending Alert")
|
|
54
|
+
print("5. Calculate Savings")
|
|
55
|
+
print("6. Monthly Report")
|
|
56
|
+
print("7. Exit")
|
|
57
|
+
|
|
58
|
+
choice = input("\nEnter your choice: ")
|
|
59
|
+
|
|
60
|
+
if choice == "1":
|
|
61
|
+
|
|
62
|
+
category = input("Enter expense category: ")
|
|
63
|
+
|
|
64
|
+
try:
|
|
65
|
+
|
|
66
|
+
amount = float(input("Enter expense amount: ₹"))
|
|
67
|
+
|
|
68
|
+
add_expense(expenses, category, amount)
|
|
69
|
+
|
|
70
|
+
print("\nExpense added successfully!")
|
|
71
|
+
|
|
72
|
+
except ValueError as error:
|
|
73
|
+
|
|
74
|
+
print("Error:", error)
|
|
75
|
+
|
|
76
|
+
elif choice == "2":
|
|
77
|
+
|
|
78
|
+
remaining = remaining_budget(budget, expenses)
|
|
79
|
+
|
|
80
|
+
print("\nRemaining Budget: ₹", round(remaining, 2))
|
|
81
|
+
|
|
82
|
+
elif choice == "3":
|
|
83
|
+
|
|
84
|
+
analysis = category_analysis(expenses)
|
|
85
|
+
|
|
86
|
+
print("\nCATEGORY-WISE EXPENSES")
|
|
87
|
+
|
|
88
|
+
if not analysis:
|
|
89
|
+
print("No expenses recorded.")
|
|
90
|
+
|
|
91
|
+
for category, amount in analysis.items():
|
|
92
|
+
|
|
93
|
+
print(category, ": ₹", round(amount, 2))
|
|
94
|
+
|
|
95
|
+
elif choice == "4":
|
|
96
|
+
|
|
97
|
+
print("\n", overspending_alert(budget, expenses))
|
|
98
|
+
|
|
99
|
+
elif choice == "5":
|
|
100
|
+
|
|
101
|
+
savings = calculate_savings(income, expenses)
|
|
102
|
+
|
|
103
|
+
print("\nYour Current Savings: ₹", round(savings, 2))
|
|
104
|
+
|
|
105
|
+
elif choice == "6":
|
|
106
|
+
|
|
107
|
+
report = monthly_report(budget, expenses)
|
|
108
|
+
|
|
109
|
+
print("\n")
|
|
110
|
+
print("=" * 45)
|
|
111
|
+
print(" MONTHLY REPORT")
|
|
112
|
+
print("=" * 45)
|
|
113
|
+
|
|
114
|
+
print("Monthly Budget : ₹", report["budget"])
|
|
115
|
+
|
|
116
|
+
print("Total Expenses: ₹", report["total_expenses"])
|
|
117
|
+
|
|
118
|
+
print("Remaining : ₹", report["remaining"])
|
|
119
|
+
|
|
120
|
+
print("\nCategory Analysis:")
|
|
121
|
+
|
|
122
|
+
if not report["categories"]:
|
|
123
|
+
print("No expenses recorded.")
|
|
124
|
+
|
|
125
|
+
for category, amount in report["categories"].items():
|
|
126
|
+
|
|
127
|
+
print(category, ": ₹", amount)
|
|
128
|
+
|
|
129
|
+
print("\nBudget Status:", report["status"])
|
|
130
|
+
|
|
131
|
+
print("=" * 45)
|
|
132
|
+
|
|
133
|
+
elif choice == "7":
|
|
134
|
+
|
|
135
|
+
print("\nThank you for using BudgetWise!")
|
|
136
|
+
print("Track Smart. Spend Wise. Save More.")
|
|
137
|
+
break
|
|
138
|
+
|
|
139
|
+
else:
|
|
140
|
+
|
|
141
|
+
print("\nInvalid choice! Please select 1-7.")
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
if __name__ == "__main__":
|
|
145
|
+
main()
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "budgetwise-srini"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Smart Personal Budget Planner using Python"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
authors = [
|
|
11
|
+
{name = "Srinivasan D"}
|
|
12
|
+
]
|
|
13
|
+
requires-python = ">=3.8"
|
|
14
|
+
|
|
15
|
+
[project.scripts]
|
|
16
|
+
budgetwise = "main:main"
|
|
17
|
+
|
|
18
|
+
[tool.setuptools]
|
|
19
|
+
packages = ["budget_pkg"]
|
|
20
|
+
py-modules = ["main"]
|