Toast notifications for Windows 10 and 11
Project description
win11toast
Toast notifications for Windows 10 and 11 based on WinRT
Installation
pip install win11toast
Usage
from win11toast import toast
toast('Hello Python🐍')
from win11toast import toast
toast('Hello Python', 'Click to open url', on_click='https://www.python.org')
Use callback
from win11toast import toast
toast('Hello Python', 'Click to open url', on_click=lambda args: print('clicked!', args))
# clicked! {'arguments': 'http:', 'user_input': {}}
Logo
from win11toast import toast
toast('Hello', 'Hello from Python', logo='https://unsplash.it/64?image=669')
Image
from win11toast import toast
toast('Hello', 'Hello from Python', image='https://4.bp.blogspot.com/-u-uyq3FEqeY/UkJLl773BHI/AAAAAAAAYPQ/7bY05EeF1oI/s800/cooking_toaster.png')
Audio
from win11toast import toast
toast('Hello', 'Hello from Python', audio='ms-winsoundevent:Notification.Looping.Alarm')
Available audio https://docs.microsoft.com/en-us/uwp/schemas/tiles/toastschema/element-audio
Button
from win11toast import toast
toast('Hello', 'Hello from Python', actions=['Dismiss'])
# {'arguments': 'dismiss', 'user_input': {}}
from win11toast import toast
toast('Hello', 'Click a button', actions=['Approve', 'Dismiss', 'Other'])
Input
from win11toast import toast
toast('Hello', 'Type anything', inputs=['textbox'], actions=['Send'])
# {'arguments': 'dismiss', 'user_input': {'textbox': 'Hi there'}}
Selection
from win11toast import toast
toast('Hello', 'Which do you like?', selections=['Apple', 'Banana', 'Grape'], actions=['Submit'])
# {'arguments': 'dismiss', 'user_input': {'selection': 'Grape'}}
No arguments
from win11toast import toast
toast()
Wrap text
from win11toast import toast
toast('Hello', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Earum accusantium porro numquam aspernatur voluptates cum, odio in, animi nihil cupiditate molestias laborum. Consequatur exercitationem modi vitae. In voluptates quia obcaecati!')
Jupyter
from win11toast import toast_async
await toast_async('Hello Python', 'Click to open url', on_click='https://www.python.org')
Debug
Acknowledgements
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
win11toast-0.11.tar.gz
(5.3 kB
view details)
Built Distribution
File details
Details for the file win11toast-0.11.tar.gz
.
File metadata
- Download URL: win11toast-0.11.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77ed3c9addbeb54facd1f0b2052e94469a481db09d5fd2428fc1a3ffceb4a762 |
|
MD5 | 7b4781d79fe4bb0a271a028b092e6693 |
|
BLAKE2b-256 | 78af9f02e187889bc16671a186c1e1892ba2d16c8daf9d81d9aaf9549942f798 |
File details
Details for the file win11toast-0.11-py3-none-any.whl
.
File metadata
- Download URL: win11toast-0.11-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86e213650f3b86d89a64a81c2fb8cf36f1c4c1c974abf9d27ae2e04f7ec3c4c1 |
|
MD5 | bedb606b1bf6ebbc84bc58dd74b5531b |
|
BLAKE2b-256 | bbe08ed16c316378c636930e01a72916b57a500a21319da3997a1be1cec4dc31 |