Task App is a command-line interface program that allows users to create and manage their tasks. The application uses an object relational data model that combines a relational database and object relational models to persist user data. The application features various functions that allow users to create, update or delete their tasks.
- View list of all people
- View list of all tasks
- View task details
- Add/delete a person to/from the database
- Add, update or delete tasks for a person
- Search the database by task id
- Search the database by person id
Below is a high level summary of the functions that accomplish these features:
- view_people(): returns list of all people
- view_tasks(): returns list of all tasks
- view_task_detail(): returns the tasks due_date and name
- delete_task(): deletes a task instance and it's details from the tasks table
- view_by_number(): returns the tasks for the person the user selects
- add_task(): creates a task object and persists the objects details to the tasks table
- manage_task(): updates or deletes a user's task and persists the updates to the tasks table
- find_by_person_id(): returns a user with matching id
- find_by_task_id(): returns a task with matching id
- add_person(): creates a person instance and persists that instance's details to the people table
- delete_person(): deletes person instance and removes instance's details from the people table
- exit_program(): exits the application when users are done managing their tasks
The program utilizes two object relational models -- Task and Person. These classes create a tasks and a people table, respectively, and maps data from the respective classes to and from those tables.
The structure is a compositional one to many relationship in which a person can have many tasks but a task is only associated with one person and a task cannot be created without a person.
Python 3.8.13 SQLite
- To get started run python pipenv install required dependencies
- Then run pipenv shell to enter into a virtual environment
- To set up the SQLite database with some seed data run python lib/seed.py
- To use the app run python lib/cli.py and follow the prompts to perform the desired actions