Skip to content

adeoyevictor/CS50P_Final_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Contacts App

Description:

A Contacts CLI App created using python and sqlite3 Functionalities include adding, deleting, updating and listing of contacts USAGE python project.py -u username

Database Design:

The database contains two tables, users and contacts joined by the user id. The users table contains the id of the user, and the username of the user. The contacts table contains the user id of the user that created the particular contact, name of the contact, email adress of the contact, and phone number of the contact. The ids are autogenerated. The contacts table refrences the users table using its user_id field which corresponds to the users id field

Register and Login:

When the program is run with the username command line argument: python project.py -u username, if the username already exists in the database the user can then add, delete, update or list contacts else, the new user is created then you can add, delete, update or list contacts

Actions:

After successful login you can choose 1 of 4 actions: add, delete, update and list to add, delete, update, and list contacts respectively

Add:

you'll be prompted for the name, email and phone number of te contact to be added. The data is then inserted into the database

Update:

You'll be prompted for the name of the contact to be updated, if the user doesn't exist an error is thrown else you'll be prompted for the new email and phone number you want to update to and its successfully inserted into the database

Delete

You'll be prompted for the name of the contact to be deleted, if the user doesn't exist an error is thrown else the contact is successfully removed from the database

List

This actions lists all the contacts in the database for the logged in user using the tabulate library. If there are no contacts present it is displayed

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages