Skip to content

deepak-joshi07/Contact_Management_application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contact Management System

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.

Features

  • 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

Project Structure

Contact_Management_System/
│
├── main.py
├── data/
│   └── contacts.json
├── contact_manager/
│   ├── contacts.py
│   ├── storage.py
│   └── validators.py

Requirements

  • Python 3.x
  • No external libraries are needed

How to Run

python main.py

Commands

Add a Contact

python main.py add --name "Deepu" --phone "9876543210"
python main.py add --name "Deepu Kumar" --phone "9876543211" --email "deepu@example.com"

Search Contact

python main.py search Deepu

Update Contact

python main.py update Deepu --phone "9999999999"
python main.py update Deepu --name "Deepu Singh" --email "deepu_new@example.com"

Delete Contact

python main.py delete Deepu

List All Contacts

python main.py list

Notes

  • 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

Future Improvements

  • Add test cases
  • Avoid duplicate contacts
  • Make the output look better
  • Add sorting and filtering options

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages