Metadata-Version: 2.4
Name: Windows-Toasts
Version: 1.4.0
Summary: Python library used to send toast notifications on Windows machines
Author: DatGuy
License-Expression: Apache-2.0
Project-URL: Documentation, https://windows-toasts.readthedocs.io
Project-URL: Source, https://github.com/DatGuy1/Windows-Toasts
Project-URL: Issues, https://github.com/DatGuy1/Windows-Toasts/issues
Project-URL: Changelog, https://github.com/DatGuy1/Windows-Toasts/blob/main/CHANGELOG.rst
Keywords: windows,toast,notifications,winrt
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
Classifier: Operating System :: Microsoft :: Windows :: Windows 11
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: winrt-runtime>=4.0
Requires-Dist: winrt-Windows.Data.Xml.Dom>=4!0
Requires-Dist: winrt-Windows.Foundation>=4!0
Requires-Dist: winrt-Windows.Foundation.Collections>=4!0
Requires-Dist: winrt-Windows.UI.Notifications>=4!0
Dynamic: license-file

# Windows-Toasts 

[![PyPI version](https://img.shields.io/pypi/v/windows-toasts)](https://pypi.org/project/windows-toasts/) [![readthedocs.io](https://app.readthedocs.org/projects/windows-toasts/badge/?version=latest)](https://windows-toasts.readthedocs.io/en/latest/) [![Supported Python versions](https://img.shields.io/pypi/pyversions/windows-toasts)](https://pypi.org/project/windows-toasts/) [![License](https://img.shields.io/pypi/l/windows-toasts)](https://github.com/DatGuy1/Windows-Toasts/blob/main/LICENSE) [![Downloads](https://static.pepy.tech/badge/windows-toasts/month)](https://pepy.tech/projects/windows-toasts) [![codecov](https://codecov.io/gh/DatGuy1/Windows-Toasts/branch/main/graph/badge.svg?token=ZD8OF2SF61)](https://codecov.io/gh/DatGuy1/Windows-Toasts) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

**Windows-Toasts** is a Python library used to send [toast notifications](https://learn.microsoft.com/windows/apps/develop/notifications/app-notifications/app-notifications-content) on Windows machines. Check out the [documentation](https://windows-toasts.readthedocs.io/en/latest/).

## 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:
```console
$ python -m pip install windows-toasts
``` 

## Usage

Simple usage:

```pycon
>>> from windows_toasts import Toast, WindowsToaster
>>> toaster = WindowsToaster("Python")
>>> newToast = Toast()
>>> newToast.text_fields = ["Hello, world!"]
>>> newToast.on_activated = lambda _: print("Toast clicked!")
>>> toaster.show_toast(newToast)
```

Full documentation is available at [readthedocs.io](https://windows-toasts.readthedocs.io/en/latest/)

## 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](https://github.com/mohabouje/WinToast)

Big thanks to dlech for his [recently created winrt fork](https://github.com/pywinrt/pywinrt)
