Pytho Report Cms
Pytho Report Cms
Submitted by:
CERTIFICATE
This is to certify that this micro project is submitted in partial fulfilment of progressive
Computer Engineering for the academic year 2022-23 as prescribe in the curriculum.
Course Co-ordinator
Rationale
The Contact Management project is written in Python using Tkinter. The project file contains
a python script (contact.py). Talking about the system, it allows the user to add and delete
contacts from the records, view the records, and so on. While adding the contact to record
items, the user has to enter the contact name and number. The system shows the contact
record in a list view. Also, the user can search for an item as it contains a search function too.
In short, this project mainly focuses on CRUD with a search function.
Features :
The user can view the list of all contacts.
You can freely add more contacts by supplying the needed details.
The system has a function that can update the list of contact by using edit option .
The system also allowed to delete some contact.
Literature review
1. https://www.javatpoint.com/how-to-install-python
I studied, how to install Python on my machine
2. https://www.code project.com
I got knowledge of programming with python language and also worked on
the project on Contact Management System.
3. https://www.sqlitetutorial.net/sqlite-python/
I get information About my project.
Actual methodology
Resources required
def welcome():
inn = input("All or New or Edit or Search or Delete: ")
return inn.lower()
def check(sname):
cur.execute(f'select name from contact where name="{sname}"')
obj = cur.fetchone()
if obj:
return True
else:
return False
def valid_no(sname):
while True:
scontact = input(f"Enter {sname}'s phone no: ")
if len(scontact)== 10 or len(scontact)== 8:
return scontact
else:
print("Number is invalid.")
def delete():
sname = input('Enter the name to be deleted: ')
sname = sname.title()
if check(sname):
cur.execute(f"delete from contact where name='{sname}'")
print("Delete successful")
else:
print(f"No contact exist named '{sname}'")
dbase.commit()
def new():
sname = input("Enter new contact name: ")
sname = sname.title()
scontact=valid_no(sname)
cur.execute('insert into contact values(?,?)',
(f'{sname}', f'{scontact}'))
print("new contact added!")
dbase.commit()
def all():
cur.execute('select * from contact')
obj = cur.fetchall()
if obj==None:
print("No contact exist!")
for a in obj:
print('name: ', a[0], ' no: ', a[1])
dbase.commit()
def update_number():
sname = input("Enter the contact name to be updated: ")
sname = sname.title()
if check(sname):
scontact = valid_no(sname)
cur.execute(f'update contact set contact="{scontact}" where name="{sname}"')
print("update successful")
else:
print(f"No contact exist named {sname}")
dbase.commit()
def update_name():
snum = input("Enter the contact number to be edited: ")
sname = input("Enter the new contact name: ")
cur.execute(f'select name from contact where contact="{snum}"')
obj=cur.fetchone()
if obj:
cur.execute(f'update contact set name="{sname.title()}" where contact="{snum}"')
print("update successful")
else:
print(f"No contact exist which has number: {snum}")
dbase.commit()
def search_number():
snum = input("Enter the contact number to be searched: ")
cur.execute(f'select name from contact where contact like "%{snum}%"')
obj = cur.fetchone()
if obj:
obj = obj[0]
print("name: ", obj)
cur.execute(f'select contact from contact where name="{obj}"')
obj = cur.fetchone()
print("contact: ", obj[0])
else:
print(f"No contact exist which has number: {snum}")
dbase.commit()
def search_name():
sname = input("Enter the contact name to be searched: ")
cur.execute(f'select name from contact where name like "%{sname}%"')
obj=cur.fetchone()
if obj:
obj = obj[0]
print("name: ",obj)
cur.execute(f'select contact from contact where name="{obj}"')
obj=cur.fetchone()
print("contact: ",obj[0])
else:
print(f"No contact exist which named: {sname}")
dbase.commit()
#main
print("WELCOME!!")
while(True):
inn = welcome()
if inn=='new':
new()
elif inn=='all':
all()
elif inn=='edit':
while True:
i = input("Edit name or number: ")
if i=='name':
update_name()
break
elif i=='number' or i=='num':
update_number()
break
else:
print("Select from the option")
elif inn=='search':
while True:
i = input("Search name or number: ")
if i=='name':
search_name()
break
elif i=='number' or i=='num':
search_number()
break
else:
print("Select from the option")
elif inn=='delete':
delete()
elif inn=='exit':
print('VISIT AGAIN!!')
break
else:
print("Select from the option")
dbase.close()
Output
Skill developed
3. Create the master slave data structure to reduce the overload of the
database queries.
Application
Contact management software is designed to help you keep track of your contact
records and improve your workflow. It can store contact information, track
communication history, and manage tasks.
When you have a lot of contacts, it can be challenging to keep track of them all.
Contact management software can help you organize your contacts, keep track of
their information, and eliminate backlogs in your workflow.
Action Plan
Name of
Planned
Sr Planned Start responsible
Details of activity finish
no. date team
date
members
Discussion and
1. finalization of topic
Preparation and
2. submission of
project proposal
4. Content preparation
Discussion about
5. required resources
Correction and
6. implementation
7. Seminar
Submission of
8. microproject
report