Skip to main content

Toast notifications for Windows 10 and 11

Project description

Python PyPI

win11toast

Toast notifications for Windows 10 and 11 based on WinRT

image

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

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')

image

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': {}}

image

Input

from win11toast import toast

toast('Hello', 'Type anything', inputs=['textbox'], actions=['Send'])
# {'arguments': 'dismiss', 'user_input': {'textbox': 'Hi there'}}

image

Selection

from win11toast import toast

toast('Hello', 'Which do you like?', selections=['Apple', 'Banana', 'Grape'], actions=['Submit'])
# {'arguments': 'dismiss', 'user_input': {'selection': 'Grape'}}

image

image

Jupyter

from win11toast import toast_async

await toast_async('Hello Python', 'Click to open url', on_click='https://www.python.org')

image

Debug

Notifications Visualizer image

Acknowledgements

Project details


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.7.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

win11toast-0.7-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file win11toast-0.7.tar.gz.

File metadata

  • Download URL: win11toast-0.7.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for win11toast-0.7.tar.gz
Algorithm Hash digest
SHA256 50ad3ff4458ec224da42c921c13a1b61362520defa7bfec45fff4c77fdfcfbc6
MD5 5d8690f59e05e73c0500fc4643a5dd21
BLAKE2b-256 cad07b3719cd02154cf79523ec07704a97fc3f7110f41e0632be0b2de71244f7

See more details on using hashes here.

File details

Details for the file win11toast-0.7-py3-none-any.whl.

File metadata

  • Download URL: win11toast-0.7-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for win11toast-0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3d82bc8f47edffce8f58bdf8c934c1ca50728613f1017415e50ad46951be6cc0
MD5 1ec0b4fa150fe2750ca16493c436ca03
BLAKE2b-256 cabb5be50ef71cd04a6b681e39b05e6877cf1a8eaa09b473d4ebde9dd9b3096f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page