0% found this document useful (0 votes)
52 views7 pages

Inventory Management System

The document outlines the development of an Inventory Management System using Python's Tkinter for the GUI and SQLite for the database, addressing the need for efficient inventory tracking. The application allows users to add, update, delete, and view inventory items easily, with a user-friendly interface and local data storage. Future enhancements include features like search functionality, user authentication, and mobile app integration.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views7 pages

Inventory Management System

The document outlines the development of an Inventory Management System using Python's Tkinter for the GUI and SQLite for the database, addressing the need for efficient inventory tracking. The application allows users to add, update, delete, and view inventory items easily, with a user-friendly interface and local data storage. Future enhancements include features like search functionality, user authentication, and mobile app integration.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

INVENTORY MANAGEMENT SYSTEM

BY: JEREES H (911522104031) & KABIL DEV K (911522104033)

Problem Statement

Businesses, stores, and warehouses often need to track their inventory — the items they have, how
many units are available, and their prices. Managing this manually can lead to errors, loss of data,
and inefficient operations.
There is a need for a simple desktop application that allows users to add, update, delete, and view
inventory items easily.

Problem Solution

We propose building a Graphical User Interface (GUI) application using Python's Tkinter library
for the frontend and SQLite for the backend database.
This application will allow users to:
• Add new inventory items (with Name, Quantity, Price).
• Update existing items.
• Delete items from the inventory.
• View all items in a well-structured table.
The application will store data locally in an SQLite database (inventory.db), making it lightweight
and easy to maintain.

Required Software Tools

Tool Purpose

Python 3.x Programming language for building the application

Tkinter GUI library (comes pre-installed with Python)

SQLite3 Lightweight database for storing inventory data

Any Text
Writing and editing code (e.g., VS Code, PyCharm, Sublime Text)
Editor/IDE

Key Benefits
• User-Friendly Interface: Even non-technical users can manage inventory easily.
• Offline Access: Works without an internet connection.
• Lightweight and Fast: Minimal system requirements.
• Secure Local Storage: All data is saved securely in a local database.
• Low Maintenance: No need for a database server or external hosting.
• Extensible: Can easily add more features like reporting, search, and category management.
• Cost-Effective: Built using free, open-source technologies.

Future Enhancements
Here are some ways you can upgrade and improve the Inventory Management System in the future:

Feature Description

Search Functionality Allow users to search for an item by name or ID.

Sorting and Filtering Sort inventory by price, quantity, or name; filter by categories.

Export to Excel/CSV Add an option to export inventory data for reporting or backup purposes.

User Authentication Add login/logout functionality to secure access.

Categories and Suppliers Group items by categories and maintain supplier details.

Restock Alerts Notify users when an item's quantity falls below a threshold.

Barcode Scanning Integrate with barcode scanners to update or find products faster.

Backup and Restore Option to backup the SQLite database and restore it when needed.

Mobile App Integration In the future, link it with a mobile app for remote management.

How to Run the Application


1. Install Python 3.x from python.org.
2. Install any required libraries (Tkinter and SQLite3 are built-in with standard Python).
3. Copy the provided code into a .py file (e.g., inventory_app.py).
4. Run the application:
python inventory_app.py
5. Start adding, updating, deleting, and managing your inventory easily!
CODING PARTS
import sqlite3
import tkinter as tk
from tkinter import messagebox, ttk
class InventoryApp:
def __init__(self, root):
self.root = root
self.root.title("Inventory Management System")
self.root.geometry("700x500")

self.conn = sqlite3.connect("inventory.db")
self.cursor = self.conn.cursor()
self.create_table()

self.setup_ui()

def create_table(self):
self.cursor.execute("""
CREATE TABLE IF NOT EXISTS inventory (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
quantity INTEGER NOT NULL,
price REAL NOT NULL
)
""")
self.conn.commit()

def setup_ui(self):
frame = tk.Frame(self.root, padx=10, pady=10)
frame.pack(pady=10)

tk.Label(frame, text="Item Name:").grid(row=0, column=0, padx=5, pady=5)


self.name_entry = tk.Entry(frame)
self.name_entry.grid(row=0, column=1, padx=5, pady=5)
tk.Label(frame, text="Quantity:").grid(row=1, column=0, padx=5, pady=5)
self.quantity_entry = tk.Entry(frame)
self.quantity_entry.grid(row=1, column=1, padx=5, pady=5)

tk.Label(frame, text="Price:").grid(row=2, column=0, padx=5, pady=5)


self.price_entry = tk.Entry(frame)
self.price_entry.grid(row=2, column=1, padx=5, pady=5)

button_frame = tk.Frame(self.root)
button_frame.pack(pady=10)

tk.Button(button_frame, text="Add Item", command=self.add_item, width=12).grid(row=0,


column=0, padx=5, pady=5)
tk.Button(button_frame, text="Update Item", command=self.update_item,
width=12).grid(row=0, column=1, padx=5, pady=5)
tk.Button(button_frame, text="Delete Item", command=self.delete_item, width=12).grid(row=0,
column=2, padx=5, pady=5)
tk.Button(button_frame, text="View Inventory", command=self.view_inventory,
width=12).grid(row=0, column=3, padx=5, pady=5)

self.tree = ttk.Treeview(self.root, columns=("ID", "Name", "Quantity", "Price"),


show="headings")
self.tree.heading("ID", text="ID")
self.tree.heading("Name", text="Item Name")
self.tree.heading("Quantity", text="Quantity")
self.tree.heading("Price", text="Price ($)")
self.tree.column("ID", width=50, anchor="center")
self.tree.column("Name", width=200, anchor="center")
self.tree.column("Quantity", width=100, anchor="center")
self.tree.column("Price", width=100, anchor="center")
self.tree.pack(pady=10, padx=10, fill=tk.BOTH, expand=True)

def add_item(self):
name = self.name_entry.get()
quantity = self.quantity_entry.get()
price = self.price_entry.get()
if name and quantity and price:
self.cursor.execute("INSERT INTO inventory (name, quantity, price) VALUES (?, ?, ?)",
(name, quantity, price))
self.conn.commit()
messagebox.showinfo("Success", "Item added successfully!")
self.view_inventory()
else:
messagebox.showwarning("Warning", "All fields are required!")

def update_item(self):
selected_item = self.tree.selection()
if selected_item:
item_id = self.tree.item(selected_item)['values'][0]
name = self.name_entry.get()
quantity = self.quantity_entry.get()
price = self.price_entry.get()
self.cursor.execute("UPDATE inventory SET name=?, quantity=?, price=? WHERE id=?",
(name, quantity, price, item_id))
self.conn.commit()
messagebox.showinfo("Success", "Item updated successfully!")
self.view_inventory()
else:
messagebox.showwarning("Warning", "Select an item to update!")

def delete_item(self):
selected_item = self.tree.selection()
if selected_item:
item_id = self.tree.item(selected_item)['values'][0]
self.cursor.execute("DELETE FROM inventory WHERE id=?", (item_id,))
self.conn.commit()
messagebox.showinfo("Success", "Item deleted successfully!")
self.view_inventory()
else:
messagebox.showwarning("Warning", "Select an item to delete!")
def view_inventory(self):
for row in self.tree.get_children():
self.tree.delete(row)
self.cursor.execute("SELECT * FROM inventory")
for row in self.cursor.fetchall():
self.tree.insert("", "end", values=row)
if __name__ == "__main__":
root = tk.Tk()
app = InventoryApp(root)
root.mainloop()
Sample Output
Conclusion

The Inventory Management System developed using Python, Tkinter, and SQLite provides a
simple, efficient, and cost-effective solution for managing inventory items.
It empowers users to add, update, delete, and view inventory records seamlessly through a user-
friendly graphical interface without requiring any technical background.
In conclusion, this project not only solves a practical problem but also serves as an excellent
foundation for learning and improving skills in GUI development, database management, and
software engineering practices.

You might also like