A simple command-line Todo application built in Python.
It allows you to create, edit, delete, and display todos persistently, stored in a JSON file.
Each user has their own todos separated by username.
- β¨ Add new todos with a title and optional due date.
- π Display todos in a clean tabular layout.
- βοΈ Edit existing todos (title, due date, and completion status).
- ποΈ Delete todos.
- β³ Visual indicator for overdue tasks.
- π€ User-based separation of tasks.
- πΎ Persistent storage with
Todo.json
.
-
Clone the repository:
git clone https://github.com/your-username/todoapp.git cd todoapp
-
Create and activate a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On macOS/Linux venv\Scripts\activate # On Windows
-
Install dependencies:
pip install -r requirements.txt
Required packages:
simple-term-menu
Run the app with:
python todo.py
- You will be asked to choose a username (unique per user).
- Youβll see a menu like this:
π€ Welcome back, mike!
========================================
π Show todos
β Add Todo
βοΈ Edit Todo
ποΈ Delete Todo
π Quit
- Use arrow keys to navigate and Enter to select.
.
βββ todo.py # Main application script
βββ Todo.json # Stores your todos persistently
βββ requirements.txt # Python dependencies
βββ README.md # Project description
{
"todos": [
{
"id": 1,
"title": "Finish project documentation",
"completed": false,
"due_date": "2025-09-30",
"user": "mike"
},
{
"id": 2,
"title": "Review pull request",
"completed": true,
"due_date": "2025-09-20",
"user": "mike"
}
]
}
- Code style: use PEP8
- Dependencies are minimal to keep this lightweight.