This repository contains three independent Python command-line projects designed for learning file handling, API integration, and basic inventory management with OOP.
Description:
A simple CLI-based contact book that allows adding, viewing, searching, editing, and deleting contacts. Data is stored in JSON for persistence.
Features:
- Add, view, search, edit, delete contacts
- Fields: Name, Phone, Email, Address
- JSON storage
- Bonus: Export to CSV, phone/email validation
Files: contacts.json— sample JSON datacontacts.csv— optional CSV exportmain.py— program code
Description:
Fetches and processes public API data (REST Countries API) to display summaries and rankings.
Features:
- Fetch data using
requests - Display total stats and top 5 countries by population
- Save results to CSV or JSON
- Graceful error handling
Files: main.py— program code
Description:
A CLI inventory manager using OOP principles, with CSV/JSON persistence and stock logs.
Features:
- Add, view, search, update, delete products
- Generate total value & low-stock report
- Stock changes logged with timestamps
- Exception handling
Files: inventory.json— initial product datainventory.csv— optional CSV exportstock_log.csv— date-wise stock updatesmain.py— program code
Tech Used:
- Python 3.x
json,csv,argparse,requests,datetime- (Optional)
pandasfor reporting
Usage:
Run any task with:
python main.py