Python is a general-purpose language, can be used to develop both desktop and web applications. By using a package available in Python named win10toast , we can create desktop notifications. It is an easy way to get notified when some event occurs.
The package is available in Pypi and it is installed using pip.
pip install win10toast
Syntax: show_toast(title=’Notification’, message=’Here comes the message’, icon_path=None, duration=5, threaded=False)
title: It contains notification title.
message: It contains notification message.
icon_path: It contains the path to .ico file.
duration“: It specifies the notification destruction active duration.
To create notifications we have to import the win10toast module. Then create an object to
ToastNotifier class and by using the method
show_toast we create a notification. It contains header or title of that notification, actual message, duration of that notification and icon for that notification.
show_toast method is a instance of notification settings.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- Get Live Weather Desktop Notifications Using Python
- Creating a Keras Callback to send notifications on WhatsApp
- Android Toast in Kotlin
- Creating Python Virtual Environment in Windows and Linux
- Opening multiple color windows to capture using OpenCV in Python
- Autorun a Python script on windows startup
- Python | How to download windows lock-screen wallpapers
- How to download and install Python Latest Version on Windows
- How to install Python on Windows?
- How to install OpenCV for Python in Windows?
- How to install Python Pycharm on Windows?
- How to install requests in Python - For windows, linux, mac
- How to Install Python Pandas on Windows and Linux?
- How to add Python to Windows PATH?
- How to Install Python Tensorflow in Windows?
- Python - Get file id of windows file
- Convert Python Code to a Software to Install on Windows Using Inno Setup Compiler
- How to Setup Sublime Text 3 for Python in Windows?
- How to Terminate a running process on Windows in Python?
- How to Install CMake for Windows in Python?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.