Skip to main content

pync

PyPI - License PyPI GitHub issues GitHub pull requests GitHub forks GitHub stars

A simple Python wrapper around the terminal-notifier command-line tool (version 2.0.0), which allows you to send User Notifications to the Notification Center on Mac OS X 10.10, or higher.

Screenshot

Installation

pip install pync

or

pip install git+https://github.com/SeTeM/pync.git

or

git clone git://github.com/SeTeM/pync.git
cd pync
python setup.py install

Usage

For full information on all the options, see the tool’s README.

Examples:

Using the notify function

import pync

pync.notify('Hello World')
pync.notify('Hello World', title='Python')
pync.notify('Hello World', group=os.getpid())
pync.notify('Hello World', activate='com.apple.Safari')
pync.notify('Hello World', open='http://github.com/')
pync.notify('Hello World', execute='say "OMG"')

pync.remove_notifications(os.getpid())

pync.list_notifications(os.getpid())

Using the notifier object

from pync import Notifier

Notifier.notify('Hello World')
Notifier.notify('Hello World', title='Python')
Notifier.notify('Hello World', group=os.getpid())
Notifier.notify('Hello World', activate='com.apple.Safari')
Notifier.notify('Hello World', open='http://github.com/')
Notifier.notify('Hello World', execute='say "OMG"')

Notifier.remove(os.getpid())

Notifier.list(os.getpid())

License

All the works are available under the MIT license. Except for ‘Terminal.icns’, which is a copy of Apple’s Terminal.app icon and as such is copyright of Apple.

See LICENSE for details.

Release files for pync 2.0.3

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

Source distribution (sdist)

Source distribution for pync 2.0.3
File Size Uploaded
pync-2.0.3.tar.gz 374.3 kB Details

Release files / pync-2.0.3.tar.gz

Download URL pync-2.0.3.tar.gz
Size 374.3 kB
Tags Source
SHA-256 checksum
How to use checksums
38b9e61735a3161f9211a5773c5f5ea698f36af4ff7f77fa03e8d1ff0caa117f
BLAKE2b-256 checksum
How to use checksums
71ce06fca51df0cceb13dbcd8168e2657ffd942184005b3bb958dd17c14e0148
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

2.0.3 This release

1 release file

2.0.2

1 release file

2.0.0

1 release file

1.6.1

1 release file

1.6

2 release files

1.5

1 release file

1.4

3 release files

1.3

1.1

1.0

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