Personalized Task Manager in Python
In this article, we are going to create a task management software in Python. This software is going to be very useful for those who don’t want to burden themselves with which task they have done and which they are left with. Being a coder we have to keep in mind which competition is going on, which courses we are enrolled with, and which YouTube playlist are we following, and so on. This software is going to keep account of all such details in a secured manner so that only you have the access to your data.
Tools and Technologies Used in the Project:
- This project is going to be very beginner-friendly.
- The working of this software is entirely POP( Procedural Oriented Programming). Basic knowledge about python functions is needed.
- Datetime module of python.
Required Skill set to Build the Project:
- Visual Studio Code or any other code editor.
Follow the below steps to implement a personalized task manager using Python:
- Step 1: Create a folder name ‘Task Manager’. Open it in your favorite code editor.
- Step 2: Create a python file with the name ‘task_manager.py’.
- Step 3: Now we are ready to code our software. Initially, we will start by creating our sign-up function. The signup function will be taking the username by which the user is going to make his/her account and ask to set a password for that account. The bellow code will make things clear.
- Step 4: Now we will create a ‘user_information’ function which will take the data from the ‘signup’ function and make a text file to save the user data. The below code will show how things will proceed.
- Step 5: Once the text file is created by the user_information function, it’s time that we code our log-in function. The log-in function will take the username and ask for the password connected to it. Once the user enters the password the function will check if the password saved in the text file is the same as that entered. The code can explain more precisely,
- Step 6: In this step, we will make sure that after the user signs in we can ask him/her to log in to their account. This can be done by calling the log-in function at the end of the sign-in function. Hence, the sign-in function will look like
- Step 7: Let’s complete the four important functions as mentioned in the ‘login ‘block. Namely, function to view data, function to add a task to the data, function to update task status, and function to view task status. In this step, we are going to complete the ‘login’ function by completing the if-else part after taking input of the user’s demand, i.e the input to the variable a. Refer to the code below:
As you can see, the pass command is used to let us write the function name and argument without the function body and also prevent the error message from it in the code editor.
- Step 8: Let’s code the view data block.
- Step 9: To code the task information block we need to keep in mind the basic concepts of text handling in python. We will ask the user how many tasks he/she wants to add and as per his wish we will iterate a loop for that many times and ask him to enter his task and the target by which he wants to finish the task.
Do notice that we have added a message that if the user wants to stop adding a task before the number of times he wished to, then he will get a chance. This makes the program very much user-friendly.
- Step 10: Updating the task status goes in the similar concept of text handling in python. What we will be doing is, we will save which task number is completed, which is ongoing, and which is not yet started with a date time stamp with them. That part of the text file will look like,
2021-06-01 14:44:02.851506 COMPLETED TASK 1,3,4 ONGOING TASK 2 NOT YET STARTED 5
- Step 11: Now we are left with the task update viewer function. This function is as simple as the ‘view_data’ function.
This puts to the end of the program. But before we end the most important task which is still left is coding the main function and controlling the flow of command of the program from the main function itself.
- Step 12: The main function.
This marks the end of the code. You should try to do suitable changes to this code so that the software becomes more beautiful.
Look how the sign-in part appears to the user:
A logged-in user will operate this software as :
Project Application in Real-Life
- This is very helpful for a student to keep account of his task or homework and its deadline of completion.
- This is very helpful for learners to keep account of what to learn and the resource.