Skip to content

hasan1369sh/Python-Contact-Book

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ž Contact Book โ€” A Smart CLI Contact Manager

A powerful, user-friendly, and persistent contact book built with Python. Designed with OOP principles, partial editing, and robust data persistence โ€” perfect for managing your contacts from the terminal.


๐Ÿš€ Features

โœจ Add Contacts โ€“ Store name, family, and phone
๐Ÿ” Smart Search โ€“ Find by name, family, or number (case-insensitive & partial match)
โœ๏ธ Partial Edit โ€“ Change only what you need (e.g., just the phone number)
๐Ÿ—‘๏ธ Remove Contacts โ€“ Clean up your list
๐Ÿ’พ Auto-Save & Load โ€“ Data persists between sessions using JSON
๐ŸŒ Unicode Support โ€“ Works perfectly with Persian, Arabic, and special characters
๐Ÿงฏ Error Resilient โ€“ Handles invalid inputs and corrupted files
โŒจ๏ธ Graceful Exit โ€“ Press Ctrl+C anytime โ€” your data is saved safely
๐Ÿงฉ OOP Design โ€“ Clean separation of Contact and ContactBook classes


๐Ÿ–ฅ๏ธ How to Run

  1. Clone the repo:

    git clone https://github.com/hasan1369sh/Python-Contact-Book.git
    
  2. Go to the project: cd Python-Contact-Book

  3. Run it: python contact_book.py

"๐Ÿ’ก No dependencies. Just pure Python ๐Ÿ "

๐ŸŽฎ Demo: Partial Editing (Game Changer!) Imagine you only want to update a phone number โ€” no need to retype everything:

Current info: Hasan Sherafat - 09900000000 Leave blank to keep current value.

New first name (current: Hasan): New last name (current: Sherafat): New phone (current: 09900000000): 09999999999

โœ… Contact updated: Hasan Sherafat - 09999999999

"๐Ÿ”ฅ You only changed the phone โ€” the rest stayed intact. "

๐Ÿ› ๏ธ Data Structure Each contact is stored in contacts.json as:

{
    "name": "Hasan",
    "family": "Sherafat",
    "phone": "09999999999"
}

All data is saved with ensure_ascii=False โ€” full Unicode support guaranteed.

๐Ÿšง Future Roadmap Add email, address, and birthday fields Sort contacts by name Export to CSV or vCard

๐Ÿ‘ค Author ๐Ÿ‘ค Hasan Sherafat ๐Ÿ“ง hasan.sherafat.69@gmail.com ๐Ÿ”— GitHub Profile

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages