Skip to main content

The simplest Pushover API wrapper for Python.

Project description

https://img.shields.io/pypi/status/pullover.svg https://img.shields.io/pypi/v/pullover.svg https://img.shields.io/pypi/pyversions/pullover.svg https://travis-ci.org/gebn/pullover.svg?branch=master https://coveralls.io/repos/github/gebn/pullover/badge.svg?branch=master

The simplest Pushover API wrapper for Python.

Features

  • No extraneous requests - just sends non-emergency messages quickly and without fuss

  • Aims to get the basics right, and be open to extension for more advanced use cases

  • Timeouts and automatic back-off should Pushover be experiencing issues

  • Intuitive command-line interface with sane, parseable output

  • Unit and integration tested

  • Signed PyPi releases

Installation

$ pip install pullover

Demo

The following code snippets demonstrate how to use the main features of pullover.

High-level API

import pullover

response = pullover.send('message', 'user key', 'app token')
if response.ok:
    print(response.id)  # 647d2300-702c-4b38-8b2f-d56326ae460b

Low-level API

from pullover import Application, User, Message, ClientSendError, \
    ServerSendError

try:
    aws = Application('app token')
    george = User('user key')
    message = Message('message', title='hello')
    response = message.send(aws, george)
    response.raise_for_status()
    print(response.id)  # 647d2300-702c-4b38-8b2f-d56326ae460b
except ClientSendError as e:
    # it was our fault
    print(e.status, e.errors)
except ServerSendError:
    # Pushover is having issues
    print(e.response.text)

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

pullover-1.0.0rc2.tar.gz (10.4 kB view hashes)

Uploaded Source

Built Distribution

pullover-1.0.0rc2-py2.py3-none-any.whl (15.3 kB view hashes)

Uploaded Python 2 Python 3

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