Skip to main content

Quickly send Pushover messages

Project description

WIP

Forked to modernize the packaging. This is my favourite Pushover library, so I'm adopting it.

Lineage

Future plans

  • Modernize where needed
  • More quick-use features

pushover

A simple Python3.3 client for http://pushover.net/ API based off of https://github.com/pix0r/pushover by pix0r.

Install:

pip install git+https://github.com/invisiblethreat/pyshover

Sample Python3 Usage:

from pushover import Pushover

po = Pushover("My App Token")
po.user("My User Token")

msg = po.msg("Hello, World!")

msg.set("title", "Best title ever!!!")

po.send(msg)

Sample Shell Usage:

./pushover "Hello, World!" --token="My App Token" --user="My User Token"

Python v3

Pushover Class:

class Pushover(builtins.object) | Creates a Pushover handler. |
| Usage: |
| po = Pushover("My App Token") | po.user("My User Token", "My User Device Name") |
| msgid, msg = po.msg("Hello, World!") |
| po.send(msgid) |
| Methods defined here: |
| init(self, token=None) | Creates a Pushover object. |
| msg(self, message) | Creates a PushoverMessage object. Takes one "message" parameter (the message to be sent). | Returns with message id (mid) and PushoverMessage object (msg). |
| send(self, mid) | Sends a specified message with id "mid". |
| sendall(self) | Sends all PushoverMessage's owned by the Pushover object. |
| user(self, user_token, user_device=None) | Sets a single user to be the recipient of all messages created with this Pushover object.

PushoverMessage Class:

 class PushoverMessage(builtins.object)
 |  Used for storing message specific data.
 |
 |  Methods defined here:
 |
 |  __init__(self, message)
 |      Creates a PushoverMessage object.
 |
 |  __str__(self)
 |
 |  get(self)
 |      Returns a dictionary with the values for the specified message.
 |
 |  set(self, key, value)
 |      Sets the value of a field "key" to the value of "value".
 |
 |  user(self, user_token, user_device=None)
 |      Sets a single user to be the recipient of this message with token "user_token" and device "user_device".

Shell

Usage:    pushover <message> --token=<TOKEN> --user=<USER> [options]

Options: -h, --help show this help message and exit --token= Pushover app token (overrides environment PUSHOVER_TOKEN) --user= Pushover user key

Optional: --device DEVICE Pushover device name --title TITLE Message title --timestamp TIMESTAMP Optional UNIX timestamp --priority PRIORITY Optional priority setting (0=normal, 1=high)

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

pyshover-0.0.1.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

pyshover-0.0.1-py3-none-any.whl (4.2 kB view hashes)

Uploaded 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