This is a desktop-based Inventory Management System built using Python.
The project focuses mainly on backend logic and data flow, while the GUI is used only as a medium to interact with the logic.
The application allows users to add, view, update, delete, and search products stored in a MySQL database.
- customtkinter – for building the GUI
- mysql-connector-python – for MySQL database connectivity
- Pillow – for image handling in the GUI
The core idea of this project is to understand how:
- User input flows from GUI to backend logic
- Data is validated before database operations
- Records are updated and searched efficiently
- A table view stays synchronized with the database
The project is structured to clearly separate:
- GUI
- Application logic
- Database operations
- User enters product details in the form
- Input is validated (no empty fields)
- Data is sent to the database insert function
- After successful insertion:
- The table is cleared
- Data is reloaded from the database
- A success message is shown to the user
This ensures the table always reflects the actual database state.
Update works differently from Add:
- User selects a row from the product table
- The selected row’s data is automatically filled into the same form
- The product ID is used only to identify the row, not to update it
- User edits the required fields
- On clicking Update:
- Backend updates the record using
WHERE id = selected_id - Table is refreshed from the database
- Backend updates the record using
The same form is reused for both Add and Update,
only the action (Save / Update) changes the behavior.
- User selects a product from the table
- Backend deletes the record using the selected product ID
- Table is refreshed to reflect the change
The search feature works as follows:
- User selects a search filter (Product / Distributor / Category)
- User enters a keyword
- Backend performs a case-insensitive partial search
- The database returns only matching rows
- Table view is refreshed with filtered results
This allows:
- Searching
desito matchDesi GheeandDESI Rabdi - Clean separation between UI and search logic
The table is never manually updated row by row.
Instead:
- The table is cleared
- Fresh data is fetched from the database
- The table is repopulated
This avoids inconsistencies between UI and database.
Screenshots are provided for better understanding of the application flow.
- The actual MySQL database is not included in this repository
- Database passwords are intentionally hidden
- To run the project:
- Create your own MySQL database
- Create tables based on the provided structure idea
- Update credentials locally
This is done for security reasons and follows standard practice.
- This project was developed with the help of:
- Official Python and MySQL documentation
- Assistance from ChatGPT for understanding concepts, debugging logic, and improving structure
All logic was read, understood, and implemented, not blindly copied.
- Clear separation of GUI and backend logic
- Proper use of IDs for update and delete operations
- Case-insensitive search handling
- Real-world CRUD application flow
- Practical understanding of Python–MySQL integration
- Clone the repository
- Create your own MySQL database
- Configure database credentials locally
- Run the main Python file
This project is meant as a learning-focused inventory system,
with emphasis on logic clarity and real application behavior,
not just UI appearance.
bw D MEGA MART is my store name

