SafeTodoManager
SafeTodoManager — an offline‑first, production‑ready Python To‑Do manager with a polished Tkinter UI, keyboard shortcuts, and flexible storage backends (filesystem, SQLite, optional encrypted files). Provides atomic saves, rotating backups/logs, headless CLI for export/backup, packaging (wheel/PyInstaller), and complete dev/test tooling.
Install / Use
/learn @SagarBiswas-MultiHAT/SafeTodoManagerREADME
To-Do List App
<div align="right"> <!-- [](https://codecov.io/gh/SagarBiswas-MultiHAT/SafeTodoManager) --> </div>A production-ready, offline-first To-Do List application built with Python and Tkinter. It ships with a clean UI, structured storage backends, optional encryption, robust logging, and full developer tooling.
Features
- Tkinter UI with search/filter, keyboard shortcuts, import/export, and undo.
- Storage backends: filesystem (text), SQLite, and optional encrypted file storage.
- Atomic saves with backup rotation and rotating logs.
- Headless CLI for exports and automated backups.
- Tested, linted, typed, and ready for packaging.
Requirements
- Python 3.11+ (3.10 supported where feasible)
- Tkinter (bundled with standard Python installers)
Installation
Clone the repository and install dev tools when needed:
git clone https://github.com/SagarBiswas-MultiHAT/SafeTodoManager.git
cd SafeTodoManager
Quick Start
Run the UI directly:
python -m todo_app
Or use the CLI entry point:
todo-app ui
CLI Installation
Installing the package into your active environment registers the todo-app console script:
pip install -e .
If you prefer not to install the project you can continue to run the commands via python -m todo_app as shown above.
Keyboard Shortcuts
Ctrl+N: add taskDel: remove selected taskCtrl+F: focus search fieldCtrl+I: import JSONCtrl+E: export JSONCtrl+Shift+I: import CSVCtrl+Shift+E: export CSV
CLI Usage
todo-app --storage fs ui
todo-app --storage sqlite ui
todo-app --storage encrypted --password "your password" ui
Headless export:
todo-app export --format json --output backups/tasks.json
todo-app export --format csv --output backups/tasks.csv
Automated backup (JSON):
todo-app backup --output backups/tasks-$(date +%Y%m%d).json
Storage Options
The data directory defaults to an OS-appropriate location.
- Windows:
%APPDATA%\todo-app - macOS/Linux:
$XDG_DATA_HOME/todo-appor~/.local/share/todo-app
Override with:
todo-app --data-dir /path/to/data ui
Encrypted Storage
Encrypted storage uses a password-derived key (PBKDF2-HMAC-SHA256 with a per-file salt).
Install encryption extras:
pip install .[encrypt]
Run with:
todo-app --storage encrypted --password "your password" ui
If you omit --password when launching the UI, a GUI prompt will ask for it.
Private Tasks
Use the Private Tasks menu in the UI to open a separate encrypted task list.
- Open Private Tasks: prompts for the password and opens the private list.
- New Private Task: opens the private list and focuses the task entry.
If cryptography is missing, the app will prompt you to install it. The password is never stored.
Import/Export
Use the File menu in the UI to import or export tasks to JSON or CSV. The CLI provides headless exports for automation.
Logging
Rotating logs are stored in the user config directory:
- Windows:
%APPDATA%\todo-app\todo-app.log - macOS/Linux:
$XDG_CONFIG_HOME/todo-app/todo-app.logor~/.config/todo-app/todo-app.log
Development
Install dev dependencies:
pip install -r requirements-dev.txt
Run linting, type checks, and tests:
ruff check .
black --check .
mypy todo_app
pytest --maxfail=1 --disable-warnings -q --cov=todo_app
When working from Windows, run the repo-installed linter so the options and version match CI.
.\.venv\Scripts\python.exe -m ruff check .Or activate the virtual environment first and run
ruff check .directly.
Run CI locally with tox:
tox
Packaging
Install the build tooling before running any packaging commands:
pip install build pyinstaller
Build a wheel:
python -m build
PyInstaller (rebuild the executable)
pyinstaller --onefile --noconsole --name todo-app todo_app/__main__.py
One-click Launch
run_todo_app.bat(on Windows) callspython -m todo_appand lives at the repo root for double-click launches.- Use
todo-app.specwith PyInstaller to emitdist/todo-app.exefor a fully packaged experience:
The bundled executable appears in thepyinstaller todo-app.specdist/directory and can be copied alongside the shared config/storage directory. (.\dist\todo-app.exe)
Troubleshooting
- UI does not open: ensure Tkinter is installed with your Python distribution.
- Encrypted storage error: install
cryptographyand confirm the password. - Permission errors: choose a custom
--data-dirwith write access.
Security
See SECURITY.md for the threat model and secure defaults.
Contributing
See CONTRIBUTING.md.
