Skip to main content

notify.py

Cross platform desktop notifications for Python scripts and applications.


Docs

You can read the docs on this Git's Wiki, or here

Supported Platforms.

  • Windows 10
  • macOS 10 >=10.10
  • Linux (libnotify)

No dependencies are required other than loguru.


Install

pip install notify-py

Usage

Send Simple Notification

from notifypy import Notify

notification = Notify()
notification.title = "Cool Title"
notification.message = "Even cooler message."

Send Notification With Icon

from notifypy import Notify

notification = Notify()
notification.title = "Cool Title"
notification.message = "Even cooler message."
notification.icon = "path/to/icon.png"

notification.send()

Send Notification With Sound

from notifypy import Notify

notification = Notify()
notification.title = "Cool Title"
notification.message = "Even cooler message."
notification.audio = "path/to/audio/file.wav"

notification.send()

Sending Notifications without blocking

from notifypy import Notify

notification = Notify()
notification.send(block=False)

Sending with Default Notification Titles/Messages/Icons

from notifypy import Notify

notification = Notify(
  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.
  notification.message = "Function Result"
  notification.send()

Important Caveats

  • As it stands (May 18, 2020), this is simply a notification service. There is no support for embedding custom actions (buttons, dialogs) regardless of platform. Other then telling you if the shell command was sent, there is also no confirmation on user action on the notification.

  • 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.


Windows Specific.

  • No support for balloon tips (pre Win10).. This will be changed in the future.

Contributors


Inspiration and Special Thanks


Contributing

Contributions are welcome.

  • Tests are ran against all platforms.
  • Black formatting is required.

Metadata

Release files for notify_py 0.2.4

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

Source distribution (sdist)

Source distribution for notify_py 0.2.4
File Size Uploaded Provenance Actions
notify_py-0.2.4.tar.gz 645.0 kB Without provenance Details for notify_py-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for notify_py 0.2.4
File Interpreter ABI Platform Actions
notify_py-0.2.4-py3-none-any.whl Python 3 none any Details for notify_py-0.2.4-py3-none-any.whl

Total release size: 1.3 MB

Release files / notify_py-0.2.4.tar.gz

Download URL notify_py-0.2.4.tar.gz
Size 645.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2a19273a476c8b003baa96650d00a81c5981c3a17ada748bc0a73aefad46d977
BLAKE2b-256 checksum
How to use checksums
16444f4fd96575c02f11f4a9394a3ed408e1bb4d8718a8cac4ae7dbd507e170c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.6

Release files / notify_py-0.2.4-py3-none-any.whl

Download URL notify_py-0.2.4-py3-none-any.whl
Size 648.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8842349e6e4ea68f38214f858a169b99d81731822737a1d461c52244d196c64
BLAKE2b-256 checksum
How to use checksums
184f156896243215ad6a637aa0397b07be50e1b66ae4145d84d2436b54b845e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.6

Security for notify_py 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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