A terminal‑based inventory management system built with Python.
It allows you to track stock levels, set low‑stock thresholds, edit items, and save/load data persistently.
- Add, remove, and edit items – manage quantity, price, threshold, and category.
- Low‑stock alerts – view items that need restocking.
- Search by name – quickly find any item.
- Total inventory value – see the sum of quantity × price.
- Persistent storage – data is saved to
inventory.jsonand loaded automatically on startup. - User‑friendly menu with emojis and clear prompts.
- Loop for multiple operations – add or edit several items without returning to the main menu.
- Make sure you have Python 3.7+ installed.
- Download all three files (
file.py,inputs.py,main.py) to the same folder. - Open a terminal in that folder and run:
python main.py
- Follow the on‑screen menu.
stock-manager/
├── file.py # Item & Inventory classes
├── inputs.py # User input functions
├── main.py # Main menu and program flow
├── inventory.json # Auto‑generated data file (after first save)
└── README.md # This file
- Attributes: name, quantity, price, threshold, category
- Methods:
__repr__(friendly display)
- Attributes:
items(dictionary mapping name → Item) - Methods:
add_item,remove_item,edit_item,find_item,low_stock,total_value,save_to_file,load_from_file
The inventory is saved to inventory.json when you choose the Save option (or automatically on exit). When the program starts, it loads from this file if it exists.
- Python 3
- JSON for data storage
- Standard library only (no external dependencies)
- Export inventory to CSV
- Add graphical interface (optional)
- Track sales history
For questions or suggestions:
dev.tharana@gmail.com
Built as a portfolio project to demonstrate object‑oriented programming, file I/O, and user interface design in Python.