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

image

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

Uploaded Source

Built Distribution

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

Uploaded Python 3

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

Hashes for win11toast-0.11.tar.gz
Algorithm Hash digest
SHA256 77ed3c9addbeb54facd1f0b2052e94469a481db09d5fd2428fc1a3ffceb4a762
MD5 7b4781d79fe4bb0a271a028b092e6693
BLAKE2b-256 78af9f02e187889bc16671a186c1e1892ba2d16c8daf9d81d9aaf9549942f798

See more details on using hashes here.

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

Hashes for win11toast-0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 86e213650f3b86d89a64a81c2fb8cf36f1c4c1c974abf9d27ae2e04f7ec3c4c1
MD5 bedb606b1bf6ebbc84bc58dd74b5531b
BLAKE2b-256 bbe08ed16c316378c636930e01a72916b57a500a21319da3997a1be1cec4dc31

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