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

from win11toast import toast

toast('Hello', 'Click a button', actions=['Approve', 'Dismiss', 'Other'])

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

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

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

Uploaded Source

Built Distribution

win11toast-0.10-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for win11toast-0.10.tar.gz
Algorithm Hash digest
SHA256 02fb04bce5d0ea00a638d3b4c167f09e687fc32cd330597748c7f9c85820251f
MD5 0af2c03920c620f148dad0152de42a42
BLAKE2b-256 c22d766c138182295d15c39704083b71c306e486dd1f979d3f84e261d8473e5e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: win11toast-0.10-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

Hashes for win11toast-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 65f83c976920bddaa4eb9b2bd6aa9e5c182d394a1077125b660688dd9b0daabe
MD5 0db3b46fd95a705449058e2a380c42d5
BLAKE2b-256 3f81284bef020d468e194ad1d088356aea2cb52f16f965427c2c467f6b5e854f

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