A feature-rich, intermediate-level task management application built with Python and Tkinter. This application demonstrates professional software development practices including MVC architecture, database migrations, data export/import, and comprehensive testing.
This project has been enhanced from a beginner-level application to an intermediate-level application with professional features and best practices.
- β Full CRUD Operations - Create, Read, Update, and Delete tasks
- π Task Editing - Edit any task attribute at any time
- β Task Completion - Mark tasks as complete or incomplete
- π¨ Color-Coded Priorities - Visual priority indicators (Low, Medium, High, Urgent)
- π Categories - Organize tasks with custom categories
- π Due Dates - Set and track task deadlines
β οΈ Overdue Detection - Automatic highlighting of overdue tasks
- π Search & Filter - Search by description, filter by category or priority
- π Task Statistics - View comprehensive statistics about your tasks
- πΎ Data Export - Export tasks to JSON or CSV formats
- π₯ Data Import - Import tasks from JSON or CSV files
- π Backup & Restore - Create database backups and restore when needed
- ποΈ Multi-Column View - Sortable columns with TreeView widget
- π― Category Management - Create and manage custom categories
- ποΈ MVC Architecture - Properly separated concerns with models, views, and database layers
- ποΈ Database Migrations - Automatic schema versioning and migration
- π Comprehensive Logging - Application logging with file and console output
- βοΈ Configuration Management - Environment variable support
- π§ͺ Unit Tests - Extensive test coverage for models and database operations
- π Error Handling - Robust error handling with user-friendly messages
- π¨ Modern UI - Clean, intuitive interface with keyboard shortcuts
task_manager/
βββ config/ # Configuration and settings
β βββ __init__.py
β βββ settings.py # Application settings with env variable support
βββ models/ # Data models
β βββ __init__.py
β βββ task.py # Task model with validation
β βββ category.py # Category model
βββ utils/ # Utility modules
β βββ __init__.py
β βββ data_export.py # Export/import functionality
β βββ validators.py # Data validation utilities
βββ views/ # UI components
β βββ __init__.py
β βββ main_window.py # Main application window
βββ tests/ # Unit tests
β βββ __init__.py
β βββ test_task.py # Task model tests
β βββ test_database.py # Database operation tests
βββ data/ # Data directory (auto-created)
β βββ exports/ # Exported files
β βββ backups/ # Database backups
βββ logs/ # Log files (auto-created)
βββ database.py # Enhanced database layer with migrations
βββ main.py # Application entry point
βββ requirements.txt # Python dependencies
βββ .env.example # Example environment configuration
βββ .gitignore # Git ignore file
βββ README.md # This file
- Python 3.8 or higher
- pip (Python package installer)
-
Clone the Repository
git clone https://github.com/saidurpulok/task_manager.git cd task_manager -
Install Dependencies
pip install -r requirements.txt
Note: Tkinter usually comes with Python. If not installed:
- Linux:
sudo apt-get install python3-tk - macOS: Included with Python
- Windows: Included with Python
- Linux:
-
Configure Environment (Optional)
cp .env.example .env # Edit .env file with your preferences -
Run the Application
python main.py
- Click "Add Task" button or press
Ctrl+N - Enter task description (required)
- Select priority level (Low, Medium, High, Urgent)
- Choose or create a category
- Set a due date (optional, format: YYYY-MM-DD)
- Click "Save"
- Select a task from the list
- Click "Edit Task" button or press
Ctrl+E - Modify any fields
- Click "Save"
- Mark Complete: Select a task and click "Mark Complete"
- Mark Incomplete: Select a completed task and click "Mark Incomplete"
- Delete Task: Select a task and press
Deletekey or click "Delete Task"
- Use the Search box to find tasks by description
- Filter by Category using the dropdown
- Filter by Priority using the dropdown
- Click Clear Filters to reset all filters
- Export to JSON/CSV: File β Export to JSON/CSV
- Import from JSON/CSV: File β Import from JSON/CSV
- Create Backup: File β Create Backup
- Restore Backup: File β Restore Backup
- Access via Category β Manage Categories
- Add new categories
- Delete unused categories (tasks will move to "General")
- View via View β Statistics or
F5to refresh - See task counts by priority and category
- Track overdue tasks
- Monitor completion rates
Ctrl+N- Add new taskCtrl+E- Edit selected taskDelete- Delete selected taskF5- Refresh view- Double-click on task - Quick edit
Run the test suite to verify everything works correctly:
# Run all tests
python -m unittest discover tests
# Run specific test file
python -m unittest tests.test_task
python -m unittest tests.test_database
# Run with verbose output
python -m unittest discover tests -vThe application can be configured using environment variables. Copy .env.example to .env and modify:
# Database location
TASK_MANAGER_DB=tasks.db
# Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
LOG_LEVEL=INFO
# Window dimensions
WINDOW_WIDTH=1000
WINDOW_HEIGHT=700The application uses SQLite for data persistence:
- Automatic Schema Management: Database schema is versioned and automatically migrated
- Data Integrity: Foreign keys and constraints ensure data consistency
- Performance: Indexed columns for fast queries
- Backup-Friendly: Simple file-based storage for easy backups
Tasks Table:
id- Unique identifierdescription- Task descriptionpriority- Priority level (Low, Medium, High, Urgent)category- Task categorydue_date- Optional due datecompleted- Completion statuscreated_at- Creation timestampupdated_at- Last update timestampcompleted_at- Completion timestamp
Categories Table:
id- Unique identifiername- Category name (unique)description- Category description
This project demonstrates intermediate Python concepts:
- Object-Oriented Programming: Classes, inheritance, encapsulation
- Database Management: SQLite, migrations, transactions
- Error Handling: Try-except blocks, custom exceptions
- Logging: Structured logging for debugging and monitoring
- Testing: Unit tests with unittest framework
- GUI Development: Tkinter, event handling, custom dialogs
- File I/O: JSON and CSV export/import
- Code Organization: Modular structure, separation of concerns
- Data Validation: Input validation and sanitization
- Configuration: Environment variables and settings management
Contributions are welcome! Here are some ideas for enhancements:
- Add recurring tasks functionality
- Implement task reminders/notifications
- Add dark mode theme
- Create task templates
- Add task attachments
- Implement task dependencies
- Add calendar view
- Create reports and charts
- Add user authentication
- Implement cloud sync
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Saidur Rahman Pulok
- Email: saidur.pulok@gmail.com
- GitHub: @saidurpulok
- Built as an educational project to demonstrate intermediate Python programming
- Enhanced from a beginner-level project to showcase professional development practices
- Thanks to the Python and Tkinter communities for excellent documentation
Note: This is an educational project designed to demonstrate intermediate-level Python programming concepts. Feel free to use it as a learning resource or starting point for your own projects!