Skip to content

SaimSM/Todo-In-Memory-Python-Console-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To-Do In-Memory Python Console App

This is a simple To-Do application implemented as a Python console application. It allows users to manage their tasks with basic CRUD (Create, Read, Update, Delete) operations, and also mark tasks as complete or incomplete. All data is stored in memory and will be lost when the application closes.

Features

  • Add Task: Create a new task with a title and description.
  • List Tasks: View all existing tasks with their ID, title, description, and completion status.
  • Update Task: Modify the title or description of an existing task.
  • Delete Task: Remove a task from the list.
  • Toggle Task Status: Mark a task as complete or incomplete.

How to Run

  1. Ensure Python is installed: This application requires Python 3.13 or newer.
  2. Navigate to the project directory:
    cd Todo-In-Memory-Python-Console-App
  3. Run the application:
    python main.py
    The application will present a menu, and you can interact with it by entering the corresponding number.

Usage

When you run main.py, you will see a menu like this:

--- To-Do Application Menu ---
1. Add Task
2. List Tasks
3. Update Task
4. Delete Task
5. Toggle Task Status
6. Exit
Enter your choice:
  • Enter 1 to add a new task. You will be prompted for a title and description.
  • Enter 2 to list all tasks.
  • Enter 3 to update an existing task. You will need to provide the task's ID and then new title/description (leave blank to keep current).
  • Enter 4 to delete a task. You will need to provide the task's ID.
  • Enter 5 to toggle the completion status of a task. You will need to provide the task's ID.
  • Enter 6 to exit the application.

How to Run Tests

The project includes unit tests for the TodoService and integration tests for CLI interactions.

  1. Navigate to the project directory:
    cd Todo-In-Memory-Python-Console-App
  2. Run all tests:
    python -m unittest discover tests
    This command will discover and run all test files within the tests/ directory.

Project Structure

.
├── main.py
├── src/
│   ├── __init__.py
│   ├── models.py
│   ├── services.py
│   └── cli.py
└── tests/
    ├── __init__.py
    ├── test_services.py
    └── test_cli.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors