Thibauth / python-pushover

Comprehensive bindings and command line utility for the Pushover notification service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python-pushover aims at providing comprehensive Python bindings for the API of the Pushover Notification Service as documented here.

Installation

You can install python-pushover from Pypi with:

Or you can install it directly from GitHub:

Overview

After being imported, the module must be initialized by calling the init function with a valid application token. Thus, a typical use of the pushover module looks like this:

You can also pass the api_token optional argument to Client to initialize the module at the same time:

Attachments can be sent with the attachment parameter which takes as argument as file object:

Command line

python-pushover also comes with a command line utility pushover that you can use as follows:

Use pushover --help to see the list of available options.

Configuration

Both the pushover module and the pushover command line utility support reading arguments from a configuration file.

The most basic configuration file looks like this:

You can have additional sections and specify a device as well:

python-pushover will attempt to read the configuration from ~/.pushoverrc by default. The section to read can be specified by using the profile argument. With the configuration file above, you can send a message by simply doing:

or pushover --title "Hello" "Hello!" from the command line.

API

You can access the full API documentation here.

About

Comprehensive bindings and command line utility for the Pushover notification service

License:GNU General Public License v3.0


Languages

Language:Python 100.0%