0% found this document useful (0 votes)
64 views31 pages

Contact Book Final

The document outlines a project titled 'Contact Book Project Using Python' submitted by S. Parkavi for a Master's degree at Periyar University. It details the project's objectives, including creating a user-friendly contact management application using Python, along with specifications for hardware and software requirements. The document also covers system design, existing and proposed systems, testing, and implementation strategies for the contact book application.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views31 pages

Contact Book Final

The document outlines a project titled 'Contact Book Project Using Python' submitted by S. Parkavi for a Master's degree at Periyar University. It details the project's objectives, including creating a user-friendly contact management application using Python, along with specifications for hardware and software requirements. The document also covers system design, existing and proposed systems, testing, and implementation strategies for the contact book application.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

CONTACT BOOK PROJECT USING PYTHON

A project work submitted in partial fulfillment of the

requirements for the degree of

Master of Science in Computer Science

to the

Periyar University, Salem – 11

By

S.PARKAVI

C22PG102CSC016

Department of Computer Science

J. K. K. NATARAJA COLLEGE OF ARTS & SCIENCE

(AFFILIATED TO PERIYAR UNIVERSITY)

KUMARAPALAYAM – 638 183

NOV/DEC-2023

1
Mr.S. BALAJI .,M.C.A.,M.Phil.,DCA.DUC.,
Head of the Department,
Department of Computer Science,
J. K . K . Nataraja College of Arts & Science, Place : Kumarapalayam

Date :

CERTIFICATE

This is to certify that the project work entitled CONTACT BOOK PROJECT USING
PYTHON submitted in partial fulfilment of the requirements of the degree of Master of Science
in Computer Science to the Periyar University, Salem is a record of bonafide work carried out by
S.PARKAVI Reg. No. C22PG102CSC016 under my supervision and guidance.

HEAD OF THE DEPARTMENT INTERNAL GUIDE

Date of Viva-Voice:

INTERNAL EXAMINER EXTERNAL EXAMINER

2
ACKNOWLEDGEMENT

It would have been highly impossible to complete this project if I don’t have interacted
with lot of people. This is my first and for most duty to thank everyone.

I wish to express my heartful thanks to Dr . V. R. PARAMESWARI M.Sc., Ph.D.,


Dean J. K. K. NATARAJA COLLEGE OF ARTS AND SCIENCE, KUMARAPALAYAM,
who provider me the necessary facilities for the successful completion of this project.

I wish to express my heartful thanks to Mrs . S . MANGAYARKARASI , M.Sc .,


M. Phil ., Principal Incharge, J. K. K. NATARAJA COLLEGE OF ARTS AND SCIENCE,
KUMARAPALAYAM, who provider me the necessary facilities for the successful completion
of this project.

I wish to express my sincere thanks to Mr. B. N. DHANASEKARAN M.C.A., M. Phil.,


SET., NET., Head of the Department of Computer Science for his valuable suggestion and
moral support in carrying out this project.

I would like to express my sincere gratitude to my internal guide Mr. S.BALAJI., M.C.A.,
M.Phil.,DCA.,DUC.,Assistant professor, Department of computer science, for his guidance from
time to time with at most patience and keen, interest, which motivated me throughout the project.

I extend my sincere thanks to all faculty members in the Department of Computer Science,
my parents and friends for their valuable guidance and support to complete this project
successfully.

Finally, I thank each and every one who has helped me to complete this project work
successfully.

S.PARKAVI

3
CONTENTS

S. NO TITLE PAGE

ABSTRACT

1. INTRODUCTION
1.1 SYSTEM SPECIFICATION
1.1.1 HARDWARE SPECIFICATION
1.1.2 SOFTWARE SPECIFICATION
1.1.3 SOFTWARE DESCRIPTION
2. SYSTEM STUDY
2.1 EXISTING SYSTEM
2.1.1 DESCRIPTION
2.1.2 DRAWBACKS
2.2 PROPOSED SYSTEM
2.2.1 DESCRIPTION
2.2.2 FEATURES
3. SYSTEM DESIGN AND DEVELOPMENT
3.1 INPUT DESIGN
3.2 OUTPUT DESIGN
3.3 SYSTEM DEVELOPMENT
3.3.1 DESCRIPTION OF MODULES
4. TESTING AND IMPLEMENTATION
5. CONCLUSION
6. BIBLIOGRAPHY
6.1 SAMPLE CODING

6.2 SCREENSHOTS

4
ABSTRACT

Contact books are a useful and widely used application all over the word. They’re

everywhere. You probably might have a contact book on your phone and on your computer. With

a contact book, you can store and manage contact information for your family members, friends,

coworkers, and so on. Real world projects will require you to apply different and varied coding

skills which will also encourage you to research topics that pop up as you’re solving problems in

the development process. In this project, the main aim is to build a contact book application with

Python with minimal-to-minimal code. With this the user will get to know how to create a basic

contact book using Python language to store and also to search contacts when ever needed. With

some modifications you can make it very useful for yourself and for others too.

To create a contact book in Python, one can start by defining a dictionary or a list of dictionaries
to store contact information. Each dictionary could represent a contact with fields like name,
phone number, email, and address. Users can interact with the contact book through a console-
based menu, allowing them to add, view, update, or delete contacts. To make it more user-
friendly, functions can be defined to handle each of these operations. Additionally, you can
implement error handling to ensure that the contact book gracefully handles invalid inputs. For
more advanced features, consider persisting the data in a file or using a database for better data
management and retrieval. Building a graphical user interface (GUI) using libraries like Tkinter can
also enhance the user experience. This basic structure provides a foundation for creating a more
robust and user-friendly contact book application in Python.

5
INTRODUCTION

CHAPTER 1

INTRODUCTION

A contact book, also commonly known as an address book or a contact manager, is a


valuable tool for organizing and storing personal and professional contact information. In this
Python project, we will explore how to create a simple contact book application that allows users
to add, retrieve, update, and delete contacts. By the end of this tutorial, you’ll have a foundational
understanding of how to work with data structures and basic user input in Python, opening the
door to more complex applications in the future. Let’s get started on building your very own Python
contact book!

6
SCOPE OF THE PROJECT
A contact book project using Python is a valuable tool for managing and organizing personal
or professional contacts. The scope of this project typically includes creating a user-friendly
interface that allows users to add, view, edit, and delete contacts. It should support essential
contact information like names, phone numbers, email addresses, and perhaps additional details
like addresses or notes. Additionally, the project can implement features such as searching for
contacts, sorting them, and exporting/importing contact data. To make it more robust, you might
consider incorporating data validation, error handling, and potentially even a graphical user
interface (GUI) for a more user-friendly experience. Overall, the scope can vary from a basic
console application to a more advanced, feature-rich application depending on the project's
objectives and complexity.

SYSTEM SPECIFICATION

HARDWARE REQUIREMENTS

This section gives the details and specification of the hardware on which the system
isexpected to work.

Processor : Intel Dual


CoreHard Disk Capacity : 500 GB
RAM : 2 GB DDR4
Monitor : 15”
Keyboard : 102 keys
Mouse : Optical Mouse

7
SOFTWARE REQUIREMENTS FOR SYSTEM

This section gives the details of the software that are used for the development.

Operating System : Windows XP SP3


IDE /WorkBench : Python IDE 3.7
User Interface : Pycharm
Client side code : Python
Programming language : Python

8
CONTACT BOOK MODEL

HISTORY OF CONTACT BOOK

The history of contact book applications using Python dates back to the early days of
software development. In the early 2000s, as personal computers became more common,
developers started creating simple contact management programs using Python's user-friendly

9
features. These early applications allowed users to store and organize their contacts, typically using
text-based interfaces.

As Python continued to gain popularity, contact book applications evolved to include


graphical user interfaces (GUIs) for a more user-friendly experience. The Tkinter library, which is
bundled with Python, played a significant role in enabling developers to create GUI-based contact
book applications. Users could now add, edit, and delete contacts with ease, making these
programs more accessible and practical.

In more recent years, contact book applications have further advanced with the integration of
database systems like SQLite or PostgreSQL. This allows for efficient storage and retrieval of
contact information, and often includes features like search and synchronization with other
devices.

Today, Python contact book applications have become even more sophisticated, with the advent
of web-based and mobile versions that leverage frameworks like Flask or Django for web
development and Kivy for mobile app development. These modern contact book applications offer
a seamless user experience across various platforms and often integrate with cloud services for
data backup and synchronization.

Overall, Python has played a vital role in the development of contact book applications,
evolving from simple text-based tools to feature-rich, cross-platform solutions over the years. Its
ease of use and versatility have made it a popular choice among developers for creating contact
management software.

10
CHAPTER 2

SYSTEM STUDY

EXISTING SYSTEM

A Python contact book system can be developed using data structures like dictionaries or
lists to store contact information. Each contact entry can include attributes like name, phone
number, email address, and more. Users can interact with the system through a command-line
interface or a graphical user interface (GUI). They can add, edit, delete, or search for contacts.
Data can be stored in a file, allowing for persistence between sessions. To enhance the system, you
can implement features such as data validation, sorting, and exporting contacts to various formats.
Additionally, integrating a database can enable more robust and scalable solutions for handling
contacts. Overall, the system aims to efficiently manage personal or business contacts, making it
easy for users to organize and access their contact information.

DRAWBACKS

• Limited features
• Data security
• Data synchronization
• User interface
• Scalability
• Data backup and recovery
• Maintenance and updates
• Cross-platform compatibility
• Integration with other software
• Learning curve

11
PROPOSED SYSTEM

The proposed system is a modern and user-friendly contact book application built using the
Python programming language. This contact book aims to provide an efficient and secure platform
for managing personal and professional contacts. Users will benefit from a rich set of features,
including the ability to add, edit, and delete contacts, organize them into categories, and search for
specific individuals quickly. The system will emphasize data security, implementing encryption
and access control mechanisms to safeguard sensitive contact information. It will also feature an
intuitive user interface, making it easy for users to interact with their contacts, and provide cross-
platform compatibility to ensure accessibility from various devices and operating systems.
Additionally, data synchronization will be a key focus, enabling users to keep their contacts up to
date across multiple devices. Regular maintenance and updates will ensure the system's
performance, security, and functionality, and it will serve as a versatile tool for individuals and
professionals to streamline their contact management needs.

ADVANTAGES

• Customization
• Open Source Libraries
• Community Support
• Data Security
• Community Contributions
• Rapid Development
• Maintainability

FEASIBILITY STUDY

The feasibility study for the development of a contact book using Python demonstrates the
viability and potential benefits of this project. From a technical perspective, Python's rich
ecosystem of libraries and its cross-platform compatibility make it a suitable choice for building a
contact book application. Python's ease of use and versatility are particularly advantageous for

12
creating a user-friendly and efficient solution.Feasibility study for a contact book project using
Python typically involves assessing the technical, economic, operational, legal, and scheduling
aspects of the project.

Technical Feasibility:
Assess the technical capability of using Python to create a contact book. This includes
evaluating Python libraries and tools for GUI development, data storage, data security, and cross-
platform compatibility.

Economic Feasibility:
Determine the cost associated with the development, maintenance, and potential
scalability of the project. Consider the budget, resources, and whether open-source tools can be
leveraged to reduce costs.

Scheduling Feasibility:
Create a timeline for the project, considering deadlines and resource availability. Ensure
that the project can be completed within a reasonable time frame.

Market Feasibility:
Determine if there is a market need for your contact book. Research existing solutions and
understand user preferences and expectations.

Alternative Solutions:
Consider alternative technologies or approaches for developing the contact book and
weigh their pros and cons against using Python.

13
CHAPTER 3

SYSTEM DESIGN AND DEVELOPMENT

INPUT DESIGN

In an information system, input is the raw data that is processed to produce output.
During the input design, the developers must consider the input devices such asPC, MICR,
OMR, etc.

Therefore, the quality of system input determines the quality of system


output. Well designed input forms and screens have following properties −

• It should serve specific purpose effectively such as storing, recording, and


retrieving the information.
• It ensures proper completion with accuracy.
• It should be easy to fill and straightforward.
• It should focus on user’s attention, consistency, and simplicity.

14
OUTPUT DESIGN

Output Design generally refers to the results and information’s that aregenerated by
the system for many end-users, output is the main reason for developing the systemand the basis
on which they evaluate the usefulness of the application.

The objective of a system finds its shape in terms of the output.

• Infrastructure and organizational changes for the proposed system.


• A data schema, often a relational schema.
• Metadata to define the tables/files and columns/data-items.
• A function hierarchy diagram or web page map that graphically describes
the program structure.
• Actual or pseudocode for each module in the program.
A prototype for the proposed system

15
MODULES DESCRIPTION

Create a GUI: Use Tkinter to design a user interface where users can add, view, update, and delete

contacts. You can create text entry fields, labels, buttons, and lists to display contacts.

Database Operations: Use SQLite to create a database to store contact information. You'll need to

set up tables to hold contact details (e.g., name, phone number, email).

Add Contacts: Create a function to input contact details and insert them into the database.

View Contacts: Retrieve and display contacts from the database in your GUI. You can use SQL

queries to fetch data.

Update Contacts: Allow users to edit contact information, and update the database accordingly.

Delete Contacts: Implement a function to delete contacts from the database.

Search Contacts: Add a search functionality to find specific contacts in your contact book.

Error Handling: Implement error handling to deal with exceptions like incorrect data input or

database connection issues.

User Feedback: Provide appropriate feedback to the user, such as success messages, error

messages, or confirmation dialogs.

Run the Application: Create a Python script that initializes the GUI, sets up the database, and

handles user interactions.

16
CHAPTER 4
SYSTEM TESTING AND IMPLEMENTATION

SYSTEM TESTING

System testing for our Python contact book begins with unit tests to validate individual

components like adding, updating, or deleting contacts. Integration tests then ensure these

components work together seamlessly. We assess data storage integrity, handling duplicates, and

user input validation. Functional tests check if features like search and sorting function as

expected. Performance testing evaluates system response times and resource consumption.

Usability testing ensures a user-friendly interface. Security testing examines data protection

measures. Finally, regression testing guarantees that new updates do not break existing features.

Thorough testing is crucial to deliver a robust and reliable contact book system.

• Design Your Contact Book

• Write Code

• System Testing

• Run Tests

• Using a Testing Framework

• Iterate and Refine

• Documentation

IMPLEMENTATION

Implementing a contact book system in Python can be a valuable project that combines
various programming concepts such as data structures, file handling, and user interaction. The

17
system typically revolves around storing and managing contact information, including names,
phone numbers, email addresses, and more

Use of Pycharm IDE for Project creation of contact Project in python

• First Install Pycharm Community Edition


• Create New Project and enter “Create”.
• Right-click on the project name you have created and Create a New Python File
as“contact book.py”
• Once you create the python file, write the entire code which includes all
themodules for contact book.
• Execute the Python Program

Import the modules required for the project

import *import
random import
time
messagebox
import sqlite3
These are the main modules required for the project including Tkinter,
random,time, and SQLite.

18
SAMPLE CODE

# Create an empty dictionary to store contacts

contacts = {}

# Function to add a contact

def add_contact():

name = input("Enter the name: ")

phone = input("Enter the phone number: ")

email = input("Enter the email address: ")

contacts[name] = {"Phone": phone, "Email": email}

print(f"{name} has been added to your contacts.")

# Function to view a contact

def view_contact(name):

contact = contacts.get(name)

if contact:

print(f"Name: {name}")

print(f"Phone: {contact['Phone']}")

print(f"Email: {contact['Email']}")

else:

print(f"{name} is not in your contacts.")

# Main loop

while True:

print("\nContact Book Menu:")

19
print("1. Add a contact")

print("2. View a contact")

print("3. Exit")

choice = input("Enter your choice (1/2/3): ")

if choice == "1":

add_contact()

elif choice == "2":

name = input("Enter the name of the contact you want to view: ")

view_contact(name)

elif choice == "3":

break

else:

print("Invalid choice. Please enter 1, 2, or 3.")

• CONCLUSION AND FURTHER ENHANCEMENTS

CONCLUSION
we have create a simple Contact Book project in Python, you can alternatively
call it as phone book or address book because it saves mobile numbers and addresses
too.You can customize this address book by adding more entries to this form like contact
book, like adding city, state, date of birth, salary, number of family members, etc.

It allows you to apply various programming concepts such as data storage, user interfaces, and
data manipulation. By using libraries like Tkinter for the GUI and SQLite for database management,
you can build a functional and user-friendly contact book.

20
FUTURE ENHANCEMENTS

• Search and Filter Functionality


• Import/Export Contacts
• Contact Images
• Integration with Web Services
• Backup and Restore
• Contact History
• Reminder and Calendar Integration
• Advanced Contact Details
• Voice Commands

BIBLIOGRAPHY

TEXT BOOKS

Author(s). (Year). Title of the source. Publisher (for books) or Name of Website. URL (for online
sources).
For example:

Smith, J. (2021). User-Centered Design for Contact Book Applications. Contact Book Publishing.

Johnson, M. (2020). Contact Book Project Management: Best Practices. Journal of Software
Development, 15(2), 123-136.

WEB REFERENCE

https://pythongeeks.org/python-contact-address-book-project/
https://realpython.com/python-contact-book/
https://www.studytonight.com/python-projects/contact-book-python- project

21
SOURCE CODE
# Create an empty dictionary to store contacts

contacts = {}

# Function to add a new contact

def add_contact(name, phone):

contacts[name] = phone

print(f"Contact {name} added successfully!")

# Function to search for a contact

def search_contact(name):

if name in contacts:

print(f"Name: {name}, Phone: {contacts[name]}")

else:

print(f"Contact {name} not found!")

# Function to list all contacts

22
def list_contacts():

if contacts:

print("Contacts List:")

for name, phone in contacts.items():

print(f"Name: {name}, Phone: {phone}")

else:

print("No contacts found!")

# Function to delete a contact

def delete_contact(name):

if name in contacts:

del contacts[name]

print(f"Contact {name} deleted successfully!")

else:

print(f"Contact {name} not found!")

# Main program loop

while True:

23
print("\nContact Management System")

print("1. Add Contact")

print("2. Search Contact")

print("3. List Contacts")

print("4. Delete Contact")

print("5. Exit")

choice = input("Enter your choice (1/2/3/4/5): ")

if choice == '1':

name = input("Enter name: ")

phone = input("Enter phone number: ")

add_contact(name, phone)

elif choice == '2':

name = input("Enter name to search: ")

search_contact(name)

elif choice == '3':

list_contacts()

24
elif choice == '4':

name = input("Enter name to delete: ")

elete_contact(name)

elif choice == '5':

print("Exiting Contact Management System. Goodbye!")

break

else:

print("Invalid choice. Please try again.")

25
SCREENSHOTS

SAMPLE INPUT

26
SAMPLE OUTPUT

27
CONTACT BOOK

28
ADD CONTACT

SEARCH CONTACT

29
LIST CONTACTS

30
DELETE CONTACT
EXIT

31

You might also like