This project provides a Stock Management System, allowing users to perform CRUD operations on stock items.
appStock.py
- This script gathers all the app's functions. Functions present in this file are:
- checkInput - Checks if the user's input is valid.
- add - Adds new products to the stock.
- update - Updates the products present in the stock.
- delete - Deletes products present in the stock.
- read - Reads all the products present in the stock.
main.py
- This function creates the app's menu and executes its functionalities.OpenSave.py
- This function opens and loads stockProducts.json file.stockProducts.json
- The file gathers all the stock information like name, price and quantity of each product.
- Python
- Required Python packages:
json
To use this repository, follow these steps:
-
Clone the repository to your local machine.
git clone https://github.com/RobisonTorres/ProjectsPython.git
-
Install required Python packages.
-
Navigate to the directory.
cd ProjectsPython/StockManagement.
-
Execute the main.py.
After running the main.py you will be able to access the app's menu:
********************************************************
Menu - Stock
********************************************************
* 1. Add new product *
* 2. Update a product *
* 3. Show all products *
* 4. Delete a product *
* 5. Exit the program *
********************************************************
Your option: 3
********************************************************
Name | Price | Quantity
________________________________________________________
Headphones | 40.00 | 20
Home audio | 80.99 | 15
Laptop | 200.00 | 10
Monitor | 150.50 | 6
Smartphone | 70.00 | 40
Tablet | 125.00 | 25
Press Enter to continue...