Inventory Management System
Inventory Management System
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.
Tool Purpose
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
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.
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.
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)
button_frame = tk.Frame(self.root)
button_frame.pack(pady=10)
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.