This is a simple contact management system built using Python. I made this project to practice working with files, functions, and command-line arguments.
The program lets you add, search, update, delete, and view contacts from the terminal. Contact data is stored in a JSON file so it stays saved after the program closes.
- Add a new contact
- Search for a contact by name, phone, email, or ID
- Update contact details
- Delete a contact
- View all saved contacts
- Store data in a JSON file
- Validate phone numbers and email addresses
Contact_Management_System/
│
├── main.py
├── data/
│ └── contacts.json
├── contact_manager/
│ ├── contacts.py
│ ├── storage.py
│ └── validators.py- Python 3.x
- No external libraries are needed
python main.pypython main.py add --name "Deepu" --phone "9876543210"
python main.py add --name "Deepu Kumar" --phone "9876543211" --email "deepu@example.com"python main.py search Deepupython main.py update Deepu --phone "9999999999"
python main.py update Deepu --name "Deepu Singh" --email "deepu_new@example.com"python main.py delete Deepupython main.py list- All contact data is stored in
data/contacts.json - Email is optional
- If email is given, it is validated
- At least one field must be given when updating a contact
- If multiple contacts match, the user will be asked to choose one
- Add test cases
- Avoid duplicate contacts
- Make the output look better
- Add sorting and filtering options