A command-line Todo Manager built with Python using Object-Oriented Programming (OOP), modules, and JSON file storage.
The application allows users to add, view, complete, and delete tasks. Tasks are stored in a JSON file so they remain available after restarting the program.
- ➕ Add tasks
- 👀 View all tasks
- ✅ Mark tasks as completed
- 🗑️ Delete tasks
- 💾 Save tasks to JSON
- 🔄 Load tasks when the program starts
- 🛡️ Handle invalid input
- 🚫 Prevent empty tasks
- 🖥️ Menu-driven command-line interface
- Python 3
- JSON
- File Handling
- Object-Oriented Programming
- Python Modules
This project helped practice:
- Classes and Objects
__init__()self- Methods
- Modules
import- Lists
- Dictionaries
- Boolean values
append()pop()enumerate()whileloopsforloopstry/exceptValueError- File handling
- JSON serialization and deserialization
os.path.exists()
python-todo-manager/
├── main.py
├── todo.py
├── tasks.json
└── README.md
The project separates the application into two Python files.
main.py
↓
imports TodoManager
↓
todo.py
↓
TodoManager
↓
tasks.json
todo.py contains the TodoManager class and task-related functionality.
main.py contains the user interface and menu.
Make sure Python 3 is installed.
Run:
python main.py==============================
📝 TODO MANAGER
==============================
1. Add Task
2. View Tasks
3. Complete Task
4. Delete Task
5. Exit
Tasks are stored in tasks.json.
Example:
[
{
"task": "Complete Python project",
"completed": true
},
{
"task": "Practice DSA",
"completed": false
}
]The application automatically saves changes when tasks are added, completed, or deleted.
- Edit tasks
- Add task deadlines
- Add task priorities
- Add categories
- Search tasks
- Filter completed and pending tasks
- Add dates and timestamps
- Create a graphical user interface
- Database integration
Ayushman Tiwari
GitHub: https://github.com/ayushman-ece