Skip to main content

Windows toast notifications sender

Project description

Windows-Toasts PyPI version Supported Python versions Downloads codecov

Windows-Toasts is a Python library used to send toast notifications on Windows machines.

Installation

Windows-Toasts supports Windows 10 and 11. While toast notifications do work on Windows 8.1 and below, Microsoft added features in Windows 10 that were never backported.

Windows-Toasts is available through PyPI:

$ python -m pip install windows-toasts

Usage

Simple usage:

>>> from windows_toasts import WindowsToaster, ToastText1
>>> wintoaster = WindowsToaster('Python')
>>> newToast = ToastText1()
>>> newToast.SetBody('Hello, world!')
>>> newToast.on_activated = lambda _: print('Toast clicked!')
>>> wintoaster.show_toast(newToast)

Proper documentation is in progress, but meanwhile you can take inspiration from the tests in tests/test_toasts.py.

But I already saw this package three times on PyPI!

I created this library since the other Windows toast notification libraries were all but abandoned, lacked features, and were using pywin32 bindings.

Using WinRT may come with its own limitations. However, the only issue I've encountered compared to using pywin32 bindings is not being able to select the duration in seconds, but rather as short/long.

Credits

The code is adapted from mohabouje's wonderful C++ WinToasts library

Big thanks to dlech for his recently created winrt fork

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

windows-toasts-0.3.2.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

windows_toasts-0.3.2-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file windows-toasts-0.3.2.tar.gz.

File metadata

  • Download URL: windows-toasts-0.3.2.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for windows-toasts-0.3.2.tar.gz
Algorithm Hash digest
SHA256 77cfc1ca4c8d22938aa043c9f9f3fb264fb0a47736dcd62959f116e477ad14b5
MD5 bd07ab87b0d12cf95c9becf15d946496
BLAKE2b-256 4ee3adc201278e11f84fb995244cb9a1d05633346669946da146e19390280927

See more details on using hashes here.

File details

Details for the file windows_toasts-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: windows_toasts-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for windows_toasts-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 66e5f4bf2443efe8c8ab2e885d7324191ef217c25aade1fc60d15d08b853c48b
MD5 969161b0f0410065b27511942a477a7e
BLAKE2b-256 6c1d7f04926ff7247f7a0d9a45fe75c11488dd0786c53494c262d5a723fef5e9

See more details on using hashes here.

Supported by

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