Skip to content

ErfanShafaat/python-todo-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

📝 To-Do List Manager (Python)

A simple yet practical To-Do List Manager built with Python. This project demonstrates core programming concepts such as Object-Oriented Programming (OOP), CSV file handling, and basic data management through a command-line interface.


🚀 Features

  • ✅ Add new tasks
  • ❌ Delete existing tasks
  • 📋 View all tasks
  • 💾 Save tasks to a CSV file
  • 📂 Load tasks from a CSV file
  • ⚡ Assign priority levels (High, Medium, Low)

🧠 Concepts Used

This project is designed to practice and demonstrate:

  • Object-Oriented Programming (OOP)
  • File handling with CSV
  • Data persistence
  • CLI (Command-Line Interface) design

🏗️ Project Structure

my_project/
│
├── venv/                # Virtual environment (not included in version control)
├── main.py              # Entry point of the application
├── requirements.txt     # Project dependencies
├── tasks.csv            # Data storage (auto-generated)
└── README.md            # Project documentation

🧩 Class Design

Task

Represents a single task.

Attributes:

  • name – Title of the task
  • description – Details about the task
  • priority – Task priority (High, Medium, Low)

ToDoList

Manages the collection of tasks.

Methods:

  • add_task() – Add a new task
  • remove_task() – Delete a task
  • view_tasks() – Display all tasks
  • save_to_csv() – Save tasks to a CSV file
  • load_from_csv() – Load tasks from a CSV file

💻 How to Run

1. Create virtual environment

python -m venv venv

2. Activate it

Windows:

venv\Scripts\activate

macOS / Linux:

source venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

4. Run the program

python main.py

🖥️ Usage

The program runs in a text-based menu, allowing you to:

  1. Add a task
  2. Remove a task
  3. View all tasks
  4. Save tasks
  5. Exit

📁 Data Storage

  • Tasks are stored in a file named tasks.csv
  • Data is automatically loaded when the program starts (if the file exists)
  • Changes can be saved manually or automatically depending on implementation

⚠️ Notes

  • The venv/ folder should not be committed to version control
  • Add the following to your .gitignore file:
venv/
__pycache__/
tasks.csv

🎯 Future Improvements

  • Add task deadlines
  • Add task completion status
  • Build a GUI (e.g., using Tkinter or PyQt)
  • Add search and filtering options

📜 License

This project is open-source and available for learning purposes.


🙌 Acknowledgements

This project is created as a hands-on exercise to improve Python programming skills.

About

A simple command-line To-Do List application built with Python. This project demonstrates Object-Oriented Programming (OOP), file handling with CSV, and interactive CLI menus. Users can add, delete, view, and save tasks with priority levels.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages