A simple Contact Book CLI application in Python that stores, retrieves, adds, and deletes contacts using a CSV file as the database.
- 📌 Add a new contact (Name, Phone, City)
- 📖 View all contacts in a tabular format
- ❌ Delete a contact by serial number
- 💾 Persistent storage using
data.csv - 🖥️ Runs directly in the terminal (CLI app)
.
├── main.py # Main Python script
├── data.csv # Contact database (auto-created if missing)
└── README.md # Project documentation
-
Clone the repo or copy the script:
git clone https://github.com/yourusername/contact-book-cli.git cd contact-book-cli -
Run the script:
python contact_book.py
-
Interact with the CLI:
Sl. Name | Phone | City ----------------------------------------------------------------- 1 John Doe | 1234567890 | New York 2 Jane Smith | 9876543210 | London Enter 'Q' for Quit, 'a' for add new contacts, 'd' for delete:
Enter 'a' for add new contacts
Enter Contact er nam: Alice
Number ??: 5551234567
Bari kothay ??: Dhaka
Enter 'd' for delete
Delete Sl no: 2
Jane Smith | 9876543210 | London | Deleting...
Done..
Enter 'Q' for Quit
-
All contacts are stored in data.csv
-
Format:
Name,Phone,City John Doe,1234567890,New York Alice,5551234567,Dhaka