A console-based CRUD application to manage product inventory using Python and MySQL.
- Add new products
- Display all products
- Search product by ID
- Update product quantity and cost
- Delete product records
- Auto-calculates product value (
PValue = PQuantity * PCost)
- Python
- MySQL
mysql-connector-python
Inventory Management System.py: Main Python applicationschema.sql: Database and table creation script
The app uses:
- Database:
Product_Data - Table:
Product - Primary key:
PID
Columns:
PID(INT)PYOM(DATE)PCategory(VARCHAR(50))PBrand(VARCHAR(20))PQuantity(INT)PCost(INT)PValue(INT)
- Python 3.x
- MySQL Server
- Python package:
mysql-connector-python
- Install Python dependency:
pip install mysql-connector-python- Create the database/table:
mysql -u root -p < schema.sql- Open
Inventory Management System.pyand update MySQL credentials in:
mysql.connector.connect(host="localhost", user="root", password="Your_Password", database="Product_Data")- Run the application:
python "Inventory Management System.py"- Add Product
- Display Product
- Update Product
- Search Product
- Delete Product
- Exit
- Year of manufacturing is prompted as
YYYYMMDD.
Ojas Deshpande [contact.ojasdeshpande@gmail.com]