Python library for cross-platform desktop notifications
Low maintenance activity. Last release 16 months ago, commits in 1 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install desktop-notifierDesktop Notifier
desktop-notifier is a Python library for cross-platform desktop notifications.
Currently supported platforms are:
- Linux via the dbus service org.freedesktop.Notifications
- macOS and iOS via the Notification Center framework
- Windows via the WinRT / Python bridge
Features
Where supported by the native platform APIs, desktop-notifier allows for:
- Clickable notifications with callbacks on user interaction
- Multiple action buttons
- A single reply field (e.g., for chat notifications)
- Notification sounds
- Notification threads (grouping notifications by topic)
- Limiting the maximum number of notifications shown in the notification center
An example of how some of this looks like on macOS:

An exhaustive list of features and their platform support is provided in the
documentation.
In addition, you can query supported features at runtime with
DesktopNotifier.get_capabilities().
Any options or configurations which are not supported by the platform will be silently ignored.
Installation
From PyPI:
pip3 install -U desktop-notifier
Usage
The main API consists of asynchronous methods which need to be awaited. Basic usage only requires the user to specify a notification title and message. For example:
import asyncio
from desktop_notifier import DesktopNotifier
notifier = DesktopNotifier()
async def main():
await notifier.send(title="Hello world!", message="Sent from Python")
asyncio.run(main())
By default, "Python" will be used as the app name for all notifications, but you can manually specify an app name and icon in the constructor. Advanced usage also allows setting different notification options such as urgency, buttons, callbacks, etc. For example, for the gif displayed above: