Professional in-memory Python console todo app with beautiful TUI
Project description
Todo Evolution ๐
Professional in-memory Python console todo app with beautiful TUI
A modern, feature-rich task management application that combines the power of a command-line interface with an intuitive, arrow-key navigable TUI dashboard. Built with Python 3.13+ and designed for developers who love working in the terminal.
โจ Features
- Beautiful TUI: Large ASCII banner "TODO EVOLUTION", rich-formatted tables, distinct colors
- Arrow-Key Navigation: Intuitive menu system powered by questionary
- Dual Modes:
- Interactive Mode: Dashboard with visual feedback (default - just run
todo) - Command Mode: Direct CLI operations for power users (
todo add "Task")
- Interactive Mode: Dashboard with visual feedback (default - just run
- 5 Core Operations: Add, List, Update, Delete, Mark Complete/Incomplete
- Pure Python Services: Reusable as a library without CLI dependencies
- In-Memory Storage: Fast, simple, no persistence overhead
- 90%+ Test Coverage: Comprehensive unit and integration tests
- Type-Safe: Full type hints with mypy validation
- Developer-Friendly: Clean API, excellent error messages
๐ฆ Installation
From PyPI (coming soon)
pip install danial-todo
From Source
# Clone the repository
git clone https://github.com/daniyalaneeq/todo-evolution.git
cd todo-evolution
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install in editable mode with dev dependencies
pip install -e ".[dev]"
๐ Quick Start
Interactive Mode (Default)
Simply run todo to launch the TUI dashboard:
todo
You'll see:
_____ ___ ____ ___
|_ _/ _ \| _ \ / _ \
| || | | | | | | | | |
| || |_| | |_| | |_| |
|_| \___/|____/ \___/
_____ _____ _ _ _____ ___ ___ _ _
| __\ \ / / _ \ | | | |_ _|_ _/ _ \| \ | |
| _|\ \ / / | | | | | | | | | | | | | \| |
| |___\ V /| |_| | |_| | | | | | |_| | |\ |
|_____\_/ \___/|____/|_| |_| |___\___/|_| \_|
What would you like to do?
โฏ Add Task
List Tasks
Update Task
Delete Task
Mark Complete/Incomplete
Exit
Navigation:
- โฌ๏ธ Up Arrow: Move selection up
- โฌ๏ธ Down Arrow: Move selection down
- Enter: Confirm selection
- Ctrl+C: Exit
Command Mode (Power Users)
Execute operations directly from the command line:
# Add tasks
todo add "Buy groceries"
todo add "Write documentation"
todo add "Deploy application"
# List all tasks
todo list
# Output:
# โโโโโโฌโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโ
# โ ID โ Title โ Status โ
# โโโโโโผโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโค
# โ 1 โ Buy groceries โ โ โ
# โ 2 โ Write documentationโ โ โ
# โ 3 โ Deploy applicationโ โ โ
# โโโโโโดโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโ
# Update a task
todo update 1 "Buy organic groceries"
# Mark task complete
todo complete 1
# Mark task incomplete
todo incomplete 1
# Delete a task
todo delete 2
# Get help
todo --help
๐ป Usage Examples
Interactive Mode Workflow
# Launch interactive mode
todo
# Follow the prompts:
# 1. Select "Add Task"
# 2. Enter: "Prepare presentation"
# 3. Select "List Tasks" to verify
# 4. Select "Mark Complete/Incomplete" and enter task ID
# 5. Select "Exit" when done
Command Mode Workflow
# Quick task management
todo add "Morning standup at 9am"
todo add "Code review PR #123"
todo add "Deploy staging environment"
# Check your tasks
todo list
# Complete tasks as you go
todo complete 1
todo complete 2
# Update task details
todo update 3 "Deploy staging and notify team"
# Clean up completed tasks
todo delete 1
todo delete 2
# Check final state
todo list
Library Usage (Programmatic API)
Use Todo Evolution as a Python library in your own applications:
from todo_evolution import TaskService, Task
# Initialize service
service = TaskService()
# Add tasks
task1 = service.add_task("Deploy app to production")
task2 = service.add_task("Run database migrations")
task3 = service.add_task("Update monitoring dashboards")
print(f"Created task {task1.id}: {task1.title}")
# List all tasks
all_tasks = service.get_all_tasks()
for task in all_tasks:
status = "โ" if task.status else "โ"
print(f"[{status}] {task.id}: {task.title}")
# Get specific task
task = service.get_by_id(1)
if task:
print(f"Found: {task.title}")
# Update task
updated = service.update_task(1, "Deploy app to production (urgent)")
print(f"Updated: {updated.title}")
# Mark complete
completed = service.toggle_status(2)
print(f"Task {completed.id} is now: {'complete' if completed.status else 'incomplete'}")
# Delete task
deleted = service.delete_task(3)
print(f"Deletion successful: {deleted}")
# Final count
remaining = service.get_all_tasks()
print(f"Total tasks remaining: {len(remaining)}")
Output:
Created task 1: Deploy app to production
[โ] 1: Deploy app to production
[โ] 2: Run database migrations
[โ] 3: Update monitoring dashboards
Found: Deploy app to production
Updated: Deploy app to production (urgent)
Task 2 is now: complete
Deletion successful: True
Total tasks remaining: 2
๐ API Reference
TaskService
Core business logic service for task management.
Methods
__init__() -> None
Initialize a new TaskService with empty state.
service = TaskService()
add_task(title: str) -> Task
Create a new task with auto-assigned ID.
Parameters:
title(str): Task description (non-empty)
Returns: Task object with id, title, and status=False
Raises: ValueError if title is empty
task = service.add_task("Buy milk")
assert task.id == 1
assert task.status == False
get_all_tasks() -> list[Task]
Retrieve all tasks in creation order.
Returns: List of Task objects (may be empty)
tasks = service.get_all_tasks()
for task in tasks:
print(task.title)
get_by_id(task_id: int) -> Task | None
Retrieve a specific task by ID.
Parameters:
task_id(int): Task identifier
Returns: Task if found, None otherwise
task = service.get_by_id(1)
if task:
print(task.title)
update_task(task_id: int, new_title: str) -> Task
Update the title of an existing task.
Parameters:
task_id(int): Task identifiernew_title(str): New description (non-empty)
Returns: Updated Task object
Raises: ValueError if task not found or title is empty
task = service.update_task(1, "Buy organic milk")
delete_task(task_id: int) -> bool
Remove a task from the collection.
Parameters:
task_id(int): Task identifier
Returns: True if deleted, False if not found
success = service.delete_task(1)
toggle_status(task_id: int) -> Task
Toggle task completion status (complete โ incomplete).
Parameters:
task_id(int): Task identifier
Returns: Updated Task object with toggled status
Raises: ValueError if task not found
task = service.toggle_status(1)
print("Complete" if task.status else "Incomplete")
Task
Data model representing a todo item.
Attributes
id(int): Unique auto-incrementing identifiertitle(str): Task description (1-500 characters)status(bool): Completion state (False=incomplete, True=complete)
from todo_evolution.models import Task
task = Task(id=1, title="Example task", status=False)
print(f"{task.id}: {task.title} - {task.status}")
๐งช Development
Setup Development Environment
# Clone repository
git clone https://github.com/yourusername/todo-evolution.git
cd todo-evolution
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install with dev dependencies
pip install -e ".[dev]"
Run Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=src/todo_evolution --cov-report=term-missing
# Run specific test file
pytest tests/unit/test_task_service.py -v
# Run integration tests only
pytest tests/integration/ -v
Code Quality
# Format code with black
black src/ tests/
# Lint with ruff
ruff check src/ tests/
# Type check with mypy
mypy src/
# Run all quality checks
black src/ tests/ && ruff check src/ tests/ && mypy src/ && pytest
Project Structure
src/todo_evolution/
โโโ __init__.py # Package exports (Task, TaskService)
โโโ models/
โ โโโ __init__.py
โ โโโ task.py # Task dataclass
โโโ services/
โ โโโ __init__.py
โ โโโ task_service.py # CRUD operations
โโโ cli/
โโโ __init__.py
โโโ utils.py # Banner, formatting utilities
โโโ interactive.py # Interactive TUI mode
โโโ commands.py # Command-line mode
โโโ main.py # Entry point router
tests/
โโโ conftest.py # Shared pytest fixtures
โโโ unit/
โ โโโ test_task_model.py # Task model tests (6 tests)
โ โโโ test_task_service.py # TaskService tests (27 tests)
โโโ integration/
โโโ test_interactive_cli.py # Interactive mode tests (20+ tests)
โโโ test_command_cli.py # Command mode tests (30+ tests)
๐ Requirements
- Python: 3.13 or higher
- Dependencies:
rich>=13.0.0- Terminal formatting and tablesquestionary>=2.0.0- Interactive promptspyfiglet>=1.0.0- ASCII art banner
- Development Dependencies:
pytest>=8.0.0- Testing frameworkpytest-cov>=4.0.0- Coverage reportingblack>=24.0.0- Code formattingruff>=0.1.0- Fast lintermypy>=1.8.0- Type checking
๐ฏ Design Principles
- Separation of Concerns: Services layer is pure Python, CLI layer handles presentation
- Test-Driven Development: 90%+ test coverage with comprehensive unit and integration tests
- Type Safety: Full type hints for better IDE support and error detection
- User Experience: Beautiful, intuitive interface with clear error messages
- Library Reusability: Core logic usable without CLI dependencies
๐ Documentation
- Feature Specification - Requirements and user stories
- Implementation Plan - Technical architecture
- Data Model - Entity specifications
- API Contracts - Service and CLI interfaces
- Task List - Implementation task breakdown
- Quickstart Guide - Developer onboarding
๐ค Contributing
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes with tests
- Run quality checks:
black . && ruff check . && mypy src/ && pytest - Commit your changes:
git commit -m 'feat: add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
Commit Message Format
Follow Conventional Commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changestest:- Test updatesrefactor:- Code refactoringchore:- Maintenance tasks
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Built with Rich for beautiful terminal output
- Interactive prompts powered by Questionary
- ASCII art by PyFiglet
- Inspired by modern CLI tools like GitHub CLI and Vercel CLI
๐ Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Full Documentation
๐บ๏ธ Roadmap
Future enhancements (not in v1.0):
- Persistent storage (JSON, SQLite)
- Task categories and tags
- Due dates and reminders
- Priority levels
- Sub-tasks and dependencies
- Export/import functionality
- Multi-user support
- Web API
๐ Project Stats
- Lines of Code: ~1,500 (src + tests)
- Test Coverage: 90%+
- Test Count: 60+ comprehensive tests
- Type Safety: 100% type-hinted
- Documentation: Comprehensive specs and guides
Made with โค๏ธ by developers, for developers
Todo Evolution - Where productivity meets elegance in the terminal
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file danial_todo-0.1.0.tar.gz.
File metadata
- Download URL: danial_todo-0.1.0.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f9e2bf1b45ead0970e81673b8349fbca9d2d2e981847639fe667e8e14026e43
|
|
| MD5 |
d143ccb85563f6bafc12c852db66ed67
|
|
| BLAKE2b-256 |
a4b241c3c6dc1f46fd89fe6a67dbda0a75e7c233574b80217e3346eeeeee3c7f
|
File details
Details for the file danial_todo-0.1.0-py3-none-any.whl.
File metadata
- Download URL: danial_todo-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
982cd5800ce6e64bec86bdbf51ff45c40104ae90bfdc623efe55bf175d74af0e
|
|
| MD5 |
c872acac3e35c2d51223dd609bcfce18
|
|
| BLAKE2b-256 |
3dc669ce34fea7fa20f74a05fcf0b45e62235004f45061aea391a9596300c989
|