Notify-py

0.3.43 · active · verified Thu Apr 16

Notify-py is a cross-platform Python library designed for sending desktop notifications on Windows, macOS, and Linux. It simplifies the process of displaying alerts, messages, and system notifications from Python scripts and applications. Currently at version 0.3.43, the library is actively maintained with frequent patch releases addressing bug fixes and minor improvements.

Common errors

Warnings

Install

Imports

Quickstart

This basic example demonstrates how to create a simple desktop notification with a title and message. You can optionally add an icon or a custom sound. For non-blocking behavior, set `block=False` on the `send()` method.

from notifypy import Notify

notification = Notify()
notification.title = "My Application Alert"
notification.message = "This is a test notification from notify-py!"
# Optional: Set an icon (path to .png) and sound (path to .wav)
# notification.icon = "/path/to/my_icon.png"
# notification.audio = "/path/to/my_sound.wav"
# To prevent blocking the main thread (runs notification in background):
# notification.send(block=False)
notification.send()

view raw JSON →