Skip to main content

Client for notify.run notifications.

Project description

Setup

notify-run can be installed with pip:

pip install notify-run

This will install both a Python module notify_run for sending notifications programmatically, and the notify-run command for sending notifications from the shell.

Configuration

Before you use either the shell command or Python package to send notifications, you must configure an endpoint. Both the command-line interface and Python interface provide a way of creating this configuration, and the configuration is shared by both. The configuration is stored in a file called .config/notify-run in your home directory.

Command-line Interface

Register a channel

To register a channel:

notify-run register

You will then be presented with a link that you can open on the devices you wish to subscribe to the channel. A QR code encoding the link is also provided for convinience.

Registering from the command line.

Sending Message

Once you have registered a channel, you can send a message to it with the send subcommand:

notify-run send "Hi from notify-run."

Using an Existing Endpoint

If you want to point notify-run at an existing endpoint, for example one created through the web interface, you can use the configure subcommand instead of register:

notify-run configure <endpoint URL>

Python Interface

The commands above can also be used through a Python interface:

from notify_run import Notify
notify = Notify()
notify.register()
notify.send('Hi there!')

The notify.register() and notify.info() commands return an EndpointInfo object. When rendered in a terminal, this prints the QR code in a terminal-friendly way. When used in a Jupyter notebook, it displays the QR code inline.

screenshots/notebook.png

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

notify-run-0.0.6.tar.gz (419.6 kB view hashes)

Uploaded Source

Supported by

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