Nikki Cs Project
Nikki Cs Project
SURAPET
NAME: S.NIKHILESH
CLASS: 12
ROLL NUMBER:
BATCH NO:
DATE:
Senior School Certificate Examination-CBSE, New Delhi for the academic Year
2024 - 2025.
Date: …………………….
2
ACKNOWLEDGEMENT
Apart from the efforts taken by me, the success of the project depends largely on the
encouragement and guidelines of many others. I take this opportunity to express my gratitude
to the people who have been instrumental in the successful completion of this project.
I express deep sense of gratitude to almighty God for giving me the strength to
complete the project successfully.
My sincere thanks to MR. R RAHUL a guide, mentor, above all a friend, who
critically reviewed my project and guided me during the implementation of the project.
The guidance and support received from all the members who contributed, was vital
for the success of the project. I am grateful for their constant support and help.
3
TABLE OF CONTENT
S NO. TOPICS PAGE
NO.
1 ABSTRACT 5
2 SYSTEM CONFIGURATION 5
3 INTRODUCTION 7
7 SOURCE CODE 10
8 OUTPUT (SCREENSHOT) 16
9 CONCLUSION 18
10 BIBLIOGRAPHY 18
4
ABSTRACT:
The Expense Management System is a Python-based software application
designed to help individuals or businesses efficiently track, manage, and analyze their
financial transactions. This project offers users a simple and intuitive interface to input and
categorize their expenses, providing a comprehensive overview of their financial activities.
The system allows users to record daily expenses, categorize them by type (e.g., food,
entertainment, bills, etc.), and generate periodic reports to track spending patterns over time.
Key features of the project include:
1. Expense Recording: Users can log their expenses, specifying the amount, category, and
date of each transaction.
2. Categorization: Expenses can be categorized for better tracking (e.g., groceries, rent,
utilities, etc.).
3. Data Storage: The system uses a file-based approach (or a database, if preferred) to
store records, ensuring that users' data is persistent across sessions.
4. Reporting: Users can view summary reports of their spending over different time
periods (daily, weekly, monthly) to analyze spending habits and make informed
financial decisions.
This Python project is implemented using libraries such as Tkinter (for GUI development),
SQL(for data storage). It aims to streamline personal financial management, providing an
easy way to track and analyze daily expenses, helping users to stay within budget and make
better financial choices.
SYSTEM CONFIGURATION:
HARDWARE CONFIGURATION
Microsoft windows 7 professional/windows 8/windows 8.2:
● Processor : Intel Core i3 or equivalent
● Memory : 2 GB (32-bit), 4 GB (64-bit)
● Disk space : 1.5 GB of free disk space
5
SOFTWARE REQUIREMENTS
● 1 GB RAM (2 GB+ recommended)
● 9-58 GB free hard disk space depending on edition and configuration, including
space required for temporary files
● DVD-ROM drive (if installing from a Media Kit DVD)
● Basic GPU – Any vendor DirectX 9.0 class or better (Pixel Shader Level 2)
● Intel® Pentium® or compatible, 1.6 GHz minimum (2GHz+ recommended)
● 1024x768 or higher-resolution monitor
6
INTRODUCTION
The Expense Management System project serves as a practical tool for individuals or
small businesses to take control of their finances. By allowing users to track expenses, set
budgets, and visualize spending trends, the system provides the necessary functionality to
promote better financial decision-making. Whether it's for personal budgeting or small business
management, this project helps users maintain financial discipline, avoid unnecessary
expenditures, and ultimately achieve greater financial stability.
1. Expense Tracking:
o To provide an easy-to-use platform where users can log all their financial
transactions, including the amount, date, and category of each expense. This allows
for accurate and consistent tracking of daily spending.
2. Budget Management:
o To enable users to set budget limits for different expense categories (e.g., groceries,
utilities, entertainment, etc.) and receive alerts when spending exceeds the allocated
budget. This helps users stay within their financial limits.
3. Categorization of Expenses:
o To organize expenses into predefined categories (e.g., food, rent, transportation,
etc.) to provide a clearer picture of where money is being spent and help users
identify areas of excessive spending.
4. Financial Reporting:
o To generate detailed and summary reports that display the user's financial activity
over different time periods (daily, weekly, monthly). These reports help users assess
their spending behavior, make informed decisions, and identify trends.
7
6. Ease of Use and Accessibility:
o To develop an intuitive and user-friendly interface that enables individuals,
regardless of their technical skills, to easily input and manage their expenses
without any complexity.
7. Expense Comparison:
o To allow users to compare expenses over different periods (monthly, weekly, etc.),
helping them track their financial progress and identify if they are improving in
terms of budgeting and savings.
8. Data Persistence:
o To store expense records in a secure and persistent database (e.g., SQLite), so users’
financial information remains intact across multiple sessions and devices.
9. Notification System:
o To implement notifications or alerts for users when they approach or exceed their
set budget, providing proactive reminders to help maintain financial discipline.
By achieving these objectives, the Expense Management System aims to help individuals or
businesses gain control over their finances, track their expenses with accuracy, and make
informed decisions to improve their financial health over time.
8
FUNCTIONS USED:
1. Add_expense() - This function is used to add the expense at the particular date and time
2. Get_expenses( ) – This function is used to retrieve the data from the user’s input
5. close() - If you are not going perform any of the above operation we
can come out of the login
9
SQL QUERIES:
SOURCE CODE:
import tkinter as tk
from tkinter import ttk, messagebox
import mysql.connector
import datetime
class ExpenseTracker:
def init (self, host="localhost", user="root", password="enter_your_password",
database="expense_tracker"):
# Connect to MySQL database
self.conn = mysql.connector.connect(
host='localhost',
user='root',
password='enter_your_password',
database='expense_tracker'
)
self.cursor = self.conn.cursor()
query = "INSERT INTO expenses (category, amount, date) VALUES (%s, %s, %s)"
self.cursor.execute(query, (category, amount, date))
self.conn.commit()
return f"Expense added: {category} - ${amount:.2f} on {date}"
def generate_report(self):
"""Generate a report of total expenses and expenses by category."""
self.cursor.execute("SELECT SUM(amount) FROM expenses")
total_expenses = self.cursor.fetchone()[0]
total_expenses = total_expenses if total_expenses else 0
return report
return report
def close(self):
"""Close the database connection."""
self.cursor.close()
self.conn.close()
self.category_entry = tk.Entry(self.root)
self.category_entry.grid(row=0, column=1, padx=10, pady=5)
12
self.amount_label = tk.Label(self.root, text="Amount ($)")
self.amount_label.grid(row=1, column=0, padx=10, pady=5)
self.amount_entry = tk.Entry(self.root)
self.amount_entry.grid(row=1, column=1, padx=10, pady=5)
# Buttons
self.add_button = tk.Button(self.root, text="Add Expense", command=self.add_expense)
self.add_button.grid(row=2, column=0, columnspan=2, pady=10)
self.month_entry = tk.Entry(self.root)
self.month_entry.grid(row=6, column=1, padx=10, pady=5)
self.year_entry = tk.Entry(self.root)
self.year_entry.grid(row=7, column=1, padx=10, pady=5)
self.tree.heading("Category", text="Category")
13
self.tree.heading("Amount", text="Amount")
self.tree.heading("Date", text="Date")
def add_expense(self):
category = self.category_entry.get()
try:
amount = float(self.amount_entry.get())
except ValueError:
messagebox.showerror("Input Error", "Please enter a valid amount.")
return
if not category:
messagebox.showerror("Input Error", "Please enter a category.")
return
def view_expenses(self):
# Clear the existing entries in the tree
for item in self.tree.get_children():
self.tree.delete(item)
def view_monthly_expenses(self):
# Get month and year from user input
try:
month = int(self.month_entry.get())
year = int(self.year_entry.get())
except ValueError:
messagebox.showerror("Input Error", "Please enter a valid month (1-12) and year.")
return
14
if not (1 <= month <= 12):
messagebox.showerror("Input Error", "Month must be between 1 and 12.")
return
def generate_report(self):
report = self.tracker.generate_report()
messagebox.showinfo("Expense Report", report)
def close(self):
self.tracker.close()
15
SQL Output:
16
PYTHON OUTPUT:
17
CONCLUSION:
BIBILOGRAPHY:
HTTPS://WWW.W3SCHOOLS.COM/PYTHON/PYTHON_MYSQL_GETSTARTED.AS P
HTTPS://WWW.TUTORIALSPOINT.COM/PYTHON/PYTHON_DATABASE_ACCESS.
HTM HTTPS://PYTHONSPOT.COM/MYSQL-WITH-PYTHON/
18