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.
- 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.
- Ensure Python is installed: This application requires Python 3.13 or newer.
- Navigate to the project directory:
cd Todo-In-Memory-Python-Console-App - Run the application:
The application will present a menu, and you can interact with it by entering the corresponding number.
python main.py
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
1to add a new task. You will be prompted for a title and description. - Enter
2to list all tasks. - Enter
3to update an existing task. You will need to provide the task's ID and then new title/description (leave blank to keep current). - Enter
4to delete a task. You will need to provide the task's ID. - Enter
5to toggle the completion status of a task. You will need to provide the task's ID. - Enter
6to exit the application.
The project includes unit tests for the TodoService and integration tests for CLI interactions.
- Navigate to the project directory:
cd Todo-In-Memory-Python-Console-App - Run all tests:
This command will discover and run all test files within the
python -m unittest discover tests
tests/directory.
.
├── main.py
├── src/
│ ├── __init__.py
│ ├── models.py
│ ├── services.py
│ └── cli.py
└── tests/
├── __init__.py
├── test_services.py
└── test_cli.py