You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

pync

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pync

Python Wrapper for Mac OS 10.10 Notification Center

2.0.3
pipPyPI
Maintainers
2

pync

.. image:: https://img.shields.io/pypi/l/pync.svg :target: https://github.com/SeTeM/pync/blob/master/LICENSE :alt: PyPI - License

.. image:: https://img.shields.io/pypi/v/pync.svg :target: https://pypi.org/project/pync/ :alt: PyPI

.. image:: https://img.shields.io/github/issues-raw/SeTeM/pync.svg :target: https://img.shields.io/github/issues-raw/SeTeM/pync.svg :alt: GitHub issues

.. image:: https://img.shields.io/github/issues-pr/SeTeM/pync.svg :target: https://img.shields.io/github/issues-pr/SeTeM/pync.svg :alt: GitHub pull requests

.. image:: https://img.shields.io/github/forks/SeTeM/pync.svg?style=social&label=Fork :target: https://github.com/SeTeM/pync :alt: GitHub forks

.. image:: https://img.shields.io/github/stars/SeTeM/pync.svg?style=social&label=Stars :target: https://github.com/SeTeM/pync :alt: GitHub stars

A simple Python wrapper around the terminal-notifier <https://github.com/alloy/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.

.. image:: http://f.cl.ly/items/1k051n3k0u0i101m1i0U/Screen%20Shot%202012-08-24%20at%2012.20.40%20PM.png :target: http://f.cl.ly/items/1k051n3k0u0i101m1i0U/Screen%20Shot%202012-08-24%20at%2012.20.40%20PM.png :alt: Screenshot

Installation ^^^^^^^^^^^^

.. code-block:: bash

pip install pync

or

.. code-block:: bash

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

or

.. code-block:: bash

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 <https://github.com/alloy/terminal-notifier/blob/master/README.markdown>_.

Examples:


Using the notify function

.. code-block:: python

   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

.. code-block:: python

   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 <https://github.com/setem/pync/blob/master/LICENSE>`_ for details.

Keywords

mac notification center wrapper

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.