Is there a way to create an interactive toast notification in windows 10 using python?
Currently I am using plyer
and sometimes I use win10toast
.
When someone clicks it i want it to open a page in the web browser and contain an image, icon, text, and user input
Asked
Active
Viewed 1,437 times
3
2 Answers
1
I rummaged through the source code for win10toast and found they use this library for creating windows gui elements and here is the most recent release. There you should be able to find the right module to use

Bugbeeb
- 2,021
- 1
- 9
- 26
-
1It's better to mention some codes than just link to somewhere else :( – Peyman Majidi Apr 03 '21 at 16:59
-
2The author did not present any code so why should I? – Bugbeeb Apr 04 '21 at 12:57
1
For the Image part, You can use the module winrt like this:
import winrt.windows.ui.notifications as notifications
import winrt.windows.data.xml.dom as dom
nManager = notifications.ToastNotificationManager
notifier = nManager.create_toast_notifier(r"C:\Users\Admin\AppData\Local\Programs\Python\Python38\python.exe")
tString = """
<toast>
<visual>
<binding template='ToastGeneric'>
<text>Another Message from Tim!</text>
<text>Hi there!</text>
<image placement="appLogoOverride" hint-crop="circle" src="https://picsum.photos/48?image=883"/>
</binding>
</visual>
</toast>
"""
xDoc = dom.XmlDocument()
xDoc.load_xml(tString)
notification = notifications.ToastNotification(xDoc)
#display notification
notifier.show(notification)
Also, There three places where you can put an image: AppLogoOverride, Inline and Hero.

N3RDIUM
- 358
- 5
- 22