Desktop notifications are a great way to get the users attention, in this post we will be creating a script in python that will push out desktop notifications. To do this we’ll be using the plyer which is used to access the features of hardware, in particular their notifications module.
Our notification in this example has 5 characteristics which are a title, a message, an application icon, a timeout until it disappears and finally as the example is not critically important we have set it to a toast notification.
Full source code can be found below which will output the following:
from plyer import notification notification.notify(title='Coffee Break', message='Its about time for a coffee break!', app_icon= 'Image.ico', timeout=20, toast=True)