A simple Python-based command-line tool to help users keep track of items and their expiry dates. This system allows users to add items with expiry dates, view all stored items, and get alerts for items that are expiring within 7 days.
β Add items with expiry dates
π Get notified about items expiring within the next 7 days
π View a list of all items
πΎ Data persistence using a JSON file (expiry_database.json)
Python 3.x
No external libraries required β uses only built-in Python modules (json, datetime).
expiry_tracker.py # Main Python script expiry_database.json # JSON file that stores item data (auto-created if not present) README.md # This file
Clone the Repository or Download the script.
Run the script using:
python expiry_tracker.py Follow the menu options:
MENU
- Add item with expiry date
- View items nearing expiry (within 7 days)
- View all items
- Exit
π§Ύ Example Adding an Item:
Enter item name: Milk
Enter expiry date (YYYY-MM-DD): 2025-06-10
β 'Milk' added with expiry date 2025-06-10
Viewing Near-Expiry Items: ___
β Items nearing expiry (within 7 days):
- Milk (Expires: 2025-06-10) ___
GUI interface using Tkinter or PyQt
Notification support (email or local alert)
Batch import/export feature for large inventories
Expired items cleanup option