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

No arguments

from win11toast import toast

toast()

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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for win11toast-0.8.tar.gz
Algorithm Hash digest
SHA256 968e803b8877bc912c3e2b6db5d38cfb56c68617cb97897c4f39da96f9746d2e
MD5 e64fea01c9ef3bf6dfe4bd84d7d00db8
BLAKE2b-256 7964aea250919406f46c53d564bb00796fcdcf6615a8865317f676d3c4ff9b27

See more details on using hashes here.

File details

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

File metadata

  • Download URL: win11toast-0.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 08a606704ef0bd1a6dd2ee43d03b6a3fd43269ada2f92bc0ad4a09b45e9b0c38
MD5 aa5b091126d724862ca5ac56b3398656
BLAKE2b-256 f65c5e9eff070186e9b719aa0b7f8ca5a25f6f07faa9ff87663c052967377cbf

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