How to Make a Reminder Application using Python

Rajat upadhyaya
Python in Plain English
2 min readJun 22, 2021

--

Hello everyone! We are going to learn how we can make a reminder application using Python. You can make your “drink water reminder” application or you can make “take a break reminder application”. I will share two ways first, for Mac users and the second one for Windows users.

First, we will see how you can make your reminder application if you are a Mac user.

For Mac users, we are going to use the pync library. We will divide our code into two parts — in the first part, we will import all required libraries, and in the second part, we will write the code for the reminder.

Here’s the first step.

Step no.1

First, we need to install pync in our system. So, we will use the below command:

pip install pync

Now we will use this library

import pyncimport time

Now, the second step:

Step no.2

def reminder():pync.notify(title = “break reminder”, message=”hello sir please take some break from work”,timeout = 1)while True:reminder()time.sleep(10)

Here, we have created a reminder function and in that reminder function, we have used the notify function. With the help of the notify function, we have defined the message, and also, we can define the timeout (which will define how much time the notification will stay on screen).

And at the end, we have created a while loop so that our program will run after every 10 seconds.

Full code:

So, now for Windows users.

We are going to use the plyer library. We will divide our code into two parts. In the first part, we will import all required libraries, and in the second part, we will write the code for the reminder.

So, here is the first step.

Step no.1

First, we need to install pync in our system so we will use the below command.

pip install plyer

Now, we will use this library:

From plyer import notificationimport time

Now, the second step.

Step no.2

def reminder():notification.notify(title = “break reminder”, message=”hello sir please take some break from work”,timeout = 1)while True:reminder()time.sleep(10)

I hope you have understood the whole code. You can also check out the video tutorial.

More content at plainenglish.io

--

--