Python Script for a shoe company. Project.
119
Shoe Inventory Management System
This Python code provides a simple inventory management system for shoes. The user can input, view and restock shoe items as well as add new items to the inventory. This program uses a class to create objects with the attributes of a shoe.
Dependencies
pandas tabulate
Class Shoe
The Shoe class is used to create an object for a shoe. The object is created with the following attributes: country, code, product, cost, and quantity. The class has three methods, get_cost(), get_quantity() and str(), to retrieve and print the attributes of the object.
Functions read_shoes_data() This function reads data from the inventory.txt file and creates Shoe objects from the data. The Shoe objects are then appended to the shoe_list.
write_to_file() This function writes Shoe objects from the shoe_list to the inventory.txt file.
capture_shoes() This function allows the user to capture details of a new shoe item and create a Shoe object with the input data. The Shoe object is then appended to the shoe_list.
view_all() This function prints all the Shoe objects in a table format using the tabulate module.
re_stock() This function finds the shoe item with the lowest quantity, and prompts the user to input a new restocked quantity. The function updates the quantity attribute of the Shoe object and then writes the updated data to the inventory.txt file.
References Pandas Tutorials: https://www.youtube.com/watch?v=W9XjRYFkkyw
Mentor: Chris Smit
Content type
Image
Digest
sha256:2af9b1b90…
Size
113 MB
Last updated
over 3 years ago
docker pull uzairu/inventory-app:v1.0