Skip to main content

Notifier

A simple Python library that simplifies the sending of desktop notifications!

What is that?

Notifier (pynotifier) is a Python library that allows you to easily send desktop notifications.
This project originally came from https://github.com/ms7m/notify-py (huge thanks), but we decided to fork this project, actively maintain it and add more features.

Supported Platforms

  • Windows 10/11
  • Windows 8.1 (Balloon tips)
  • macOS 10 >=10.10
  • Linux (libnotify)
Windows 7 Windows 8.1 Windows 10 Windows 11 Linux macOS 10 >=10.10
❓ ✅
(Balloon tips)
✅
(Toast notification)
✅
(Toast notification)
✅
(requires libnotify)
✅
(No custom icon)

Installation

You can install notifier with pip

pip install notifier.py

Usage

Send Simple Notification

from notifier import Notifier

notifier = Notifier()
notifier.title = "Some title"
notifier.message = "Some message"

notifier.send()

Send Notification With Icon

from notifier import Notifier

notifier = Notifier()
notifier.title = "Some title"
notifier.message = "Some message"
notifier.icon = "path/to/icon.png" # .png is not supported under windows 8.1

notifier.send()

Send Notification With Sound

from notifier import Notifier

notifier = Notifier()
notifier.title = "Some title"
notifier.message = "Some message"
notifier.audio = "path/to/audio/file.wav" # we currently only support wav files

notifier.send()

Sending with Default Notification Titles/Messages/Icons

from notifier import Notifier

notifier = Notifier(
  default_notification_title="Function Message",
  default_application_name="Great Application",
  default_notification_icon="path/to/icon.png",
  default_notification_audio="path/to/sound.wav"
)

def your_function():
  # stuff happening here.
  notifier.message = "Function Result"
  notifier.send()

Disabling Windows Version Detection

from notifier import Notifier

notifier = Notifier(override_windows_version_detection=True)
notifier.title = "Some title"
notifier.message = "Some message"

notifier.send()

Changing Windows Override Version

from notifier import Notifier

notifier = Notifier(override_windows_version="8.1") # Available values: 10, 8.1
notifier.title = "Some title"
notifier.message = "Some message"

notifier.send()

Inspiration and Special Thanks

Side notes

  • macOS does not support custom icons on the fly.. You will need to bundle a customized version of the notifier embedded with your custom icon.

Metadata

Release files for notifier.py 0.4.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for notifier.py 0.4.6
File Size Uploaded
notifier.py-0.4.6.tar.gz 176.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for notifier.py 0.4.6
File Interpreter ABI Platform
notifier.py-0.4.6-py3-none-any.whl Python 3 none any Details

Total release size: 355.7 kB

Release files / notifier.py-0.4.6.tar.gz

Download URL notifier.py-0.4.6.tar.gz
Size 176.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8cda7eb6703438adbc733496eb14d57fff80c4702f5511cd73a00fab8de6cb2d
BLAKE2b-256 checksum
How to use checksums
42d357dfbef2da63512520a945d0f514278110b4c5a7f93b2c5b1fe723dd9bb2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / notifier.py-0.4.6-py3-none-any.whl

Download URL notifier.py-0.4.6-py3-none-any.whl
Size 179.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
239599b7448ac3d1edfff83fcef20281297189673a68bca1b7ae81269b269e1d
BLAKE2b-256 checksum
How to use checksums
7a07b7960370b0a42fb98d4959008b7e7fae49e6f16876133e9338566e4c5715
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.4.6 This release

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.38

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page