Desktop Notification with Python

It’s great to develop an app that reminds you of your plans like an alarm or a to-do list. In this article, I’ll walk you through how to write a program to get a desktop notification with Python.

How Does a Desktop Notification App Work?

The main purpose of the desktop notification app that you will learn to develop today is to constantly remind us of the different things that we need to accomplish throughout the day. 

Also, Read – 100+ Machine Learning Projects Solved and Explained.

This task is similar to a to-do list, where we have a set of goals to achieve. And the desktop notification app will constantly notify us of the different to-do and actions to take throughout the day.

Desktop Notification with Python

I am going to create a desktop notification app to get a reminder to rest after every hour. Your message and alert can be absolutely anything you want. You can have a list of things you need to do in the day, week or month, and the reminder app will constantly remind you of the same.

For this task you need to install a Python library known as Plyer, which is used to access the hardware components of your system. This library can be easily installed by using the pip command; pip install pyler.

Now let’s see how to write a Python program to get desktop notifications:

import time
from plyer import notification

if __name__ == "__main__":
    while True:
            title = "ALERT!!!",
            message = "Take a break! It has been an hour!",
            timeout = 10

After running the code, you will continuously receive notifications every hour or until the time you set due to the while loop defined in the code. Hope you liked this article on how to receive desktop notifications with Python. Please feel free to ask your valuable questions in the comments section below.

Aman Kharwal
Aman Kharwal

I'm a writer and data scientist on a mission to educate others about the incredible power of data📈.

Articles: 1498


  1. hello, brother. you are doing a great job. i have a question . can we add this kind of project in our cv??

Leave a Reply