Objective
Manage a personal to-do list from the terminal without an external service.
Task dataclass with UUID and creation timestamp. Operations return new lists instead of mutating state; storage is a separate module.
Challenges
- 01Persisting UUIDs and datetimes in plain JSON
- 02Handling unknown or malformed IDs without a traceback
How it was solved
- 01asdict on save; UUID and datetime rebuilt on load
- 02ValueError on lookup, printed as an error message
Results
- No third-party dependencies: runs on the Python standard library
Overview
Python command-line app that keeps a to-do list in tasks.json. The file is written to the working directory after every change.
Technical Implementation
Data Model
Fields: title, optional category, UUID, creation timestamp, completion flag. Updates use dataclasses.replace.
Storage
A missing file loads as an empty list, so the first run needs no setup.
CLI
Each argparse subcommand maps to a handler that loads, applies the change and saves.
Features
add "<title>" --category <name>creates a task; category is optionallistprints status ([X]/[ ]), title, date, category and IDcomplete <id>marks a task as donedelete <id>removes a task
Technologies
- Python 3.12
- Argparse
- JSON
- UUID
