Skip to main content

Cross-platform desktop notification library for Python

Project description


notify.py

Cross platform desktop notifications for Python scripts and applications.


Docs

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

Repackaged due to loguru version constraints. This project is from: https://github.com/ms7m/notify-py

Supported Platforms.

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

No dependencies are required other than loguru & jeepney (Only for linux/DBUS).


Install

pip install tellit

Usage

Send Simple Notification

from tellit import Notify

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

Send Notification With Icon

from tellit 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 tellit 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 tellit import Notify

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

Sending with Default Notification Titles/Messages/Icons

from tellit 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()

CLI

A CLI is available when you install tellit

tellit --title --message --applicationName --iconPath --soundPath

You may need to add python3 -m to the beginning.


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!

Please base your changes on the latest development branch and open a PR to that branch. PR will not be accepted to the master branch. Tests are ran against all platforms.

Setting Up Environment

  • Install Poetry
    • poetry install
  • Add patches/new features/bug fiexes
  • Run tests
    • poetry run pytest tests/*
  • Run lints
    • poetry run pylint --errors-only tellit/
  • Run Black Formatting
    • poetry run black tellit
  • Open PR to dev branch.
  • Add your name to contributors list if you wish!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tellit-0.3.43.tar.gz (647.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tellit-0.3.43-py3-none-any.whl (649.8 kB view details)

Uploaded Python 3

File details

Details for the file tellit-0.3.43.tar.gz.

File metadata

  • Download URL: tellit-0.3.43.tar.gz
  • Upload date:
  • Size: 647.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for tellit-0.3.43.tar.gz
Algorithm Hash digest
SHA256 8d0814b7eb35ddc2097737d1dbae9b887831cd0a3e5775a088f856083febf1e9
MD5 78f31c7299be78c4e2dc0e54be89ebba
BLAKE2b-256 205b009cae9b1f4ebd4c1aa48569315e18abe55da05f910584bc187d228df8bd

See more details on using hashes here.

File details

Details for the file tellit-0.3.43-py3-none-any.whl.

File metadata

  • Download URL: tellit-0.3.43-py3-none-any.whl
  • Upload date:
  • Size: 649.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for tellit-0.3.43-py3-none-any.whl
Algorithm Hash digest
SHA256 eb35c2d61005cb0cb0a8055a848c6d091f62ef10bc08e1edb7328c2576c70c02
MD5 0b88565fc683b2c5e262181e267eac29
BLAKE2b-256 b46e2f51202a893c7894e46da2accae9e7a4a43dc6eb9e4581bcc1a03e509da4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page