A command-line To-Do List application built with Python using object-oriented programming and CSV file storage. The project supports adding, removing, viewing, saving, and loading tasks, with a priority field for each task.
- Add a new task with name, description, and priority.
- Remove an existing task by name.
- View all saved tasks in a numbered list.
- Automatically save tasks to a CSV file.
- Automatically load tasks from a CSV file when the program starts.
- Simple text-based menu for interacting with the program.
- Python 3
- Built-in
csvmodule - Object-Oriented Programming (OOP)
- Command-line interface (CLI)
todo-list-python/
├── todo.py
├── README.md
├── .gitignore
├── tasks.csv
└── venv/
The project uses two main classes:
- Task: Represents a single task with
name,description, andpriority. - ToDoList: Manages the collection of tasks, including adding, removing, displaying, saving, and loading tasks.
Tasks are stored in tasks.csv, and the file is read automatically when the application starts. New changes are saved automatically after adding or removing a task.
git clone https://github.com/PoriaJalalvandi/todo-list-python.git
cd todo-list-pythonpython -m venv venv
venv\Scripts\activatepython3 -m venv venv
source venv/bin/activatepython todo.pyIf python does not work on your system, use:
python3 todo.pyWhen the program starts, the following menu is shown:
=== To-Do List Menu ===
1. Add Task
2. Remove Task
3. View Tasks
4. Exit
- Choose
1to add a task. - Enter task name, description, and priority (
high,medium, orlow). - Choose
3to view saved tasks. - Choose
2to remove a task by name. - Choose
4to exit the program.
Each row in tasks.csv stores one task:
Study Python,Practice OOP concepts,high
Buy groceries,Milk and bread,medium
Go to gym,Leg day workout,low- Validate user input for task priority.
- Add task editing support.
- Sort tasks by priority.
- Add due dates and task status.
- Write unit tests for core methods.
Name: Ali
GitHub: PoriaJalalvandi
Email: pouriyajalalvandi@gmail.com
This project is for educational and portfolio purposes.