PyTaskManager is a command-line application that provides a straightforward way to manage tasks directly from the terminal. Built as a portfolio project, it highlights a practical implementation of Python and SQL for database interaction.
The application demonstrates a solid CRUD (Create, Read, Update, Delete) system with a focus on good software architecture. The project is structured using Object-Oriented Programming (OOP), separating the user interface from the business logic and database interactions, making the codebase clean, modular, and easy to maintain.
-
Add Task: Create new tasks with a title, description, deadline, and priority. The application includes robust date validation to ensure deadlines are in the future.
-
List Tasks: View tasks with a flexible sub-menu. Users can list all tasks, pending tasks, completed tasks, or even overdue tasks.
-
Edit Task: Modify an existing task's title, description, deadline, or priority. The application allows users to skip fields by pressing enter, keeping the original value.
-
Mark as Completed: Change a task's status to 'completed'.
-
Delete Task: Remove tasks from the database.
-
Overdue Task Alert: The application automatically alerts the user upon launch if there are any pending tasks with a past deadline.
Make sure you have Python installed on your machine.
- Clone the repository to your local machine:
git clone https://github.com/yovisck-c/PyTaskManager.git
- Navigate to the project directory:
cd PyTaskManager
- Run the main script:
python3 main.py
Project structure is as follows:
.
|-- .gitignore
|-- .gitattributes
|-- .pys
| |-- main.py
| |-- utils.py
| |-- task_service.py
| └── models.py
|
|-- tasks.db (This file is automatically generated)
└── README.md
-
main.py: The entry point of the application, containing the main menu logic and user interface.
-
task_service.py: A service layer that handles all interactions with the SQLite database. It uses a context manager to ensure connections are handled safely.
-
models.py: Defines the Task class, an object-oriented representation of a task.
-
utils.py: A collection of reusable utility functions, such as screen clearing and date validation.
-
tasks.db: The SQLite database file, which is automatically generated on the first execution.
-
.gitignore: List of files and folders that Git should ignore.
- Python 3.x
- SQLite3
Contributions are welcome! If you have ideas or suggestions, feel free to open an issue or send a pull request.
This project is under the MIT license. For more details, see the LICENSE file.