Skip to main content

A simple Pushover client written in Python.

Project description

pushover-client


This package provides an easy-to-use Python 3 interface for the Pushover API. Written in pure Python off the requests module.


Install

python3 -m pip install git+https://github.com/Nythepegasus/pushover-client/

Supported Features

Client

  • send: Send a Message/Glance through the API.
  • verify_user: Verifies that the current user_token and api_key are valid and working.
  • get_limits: Get the current api_key's limits.
  • get_receipt: Gets the receipt of a priority 2 Message.

Message

  • message: The message of the notification, can contain HTML.
  • title: An optional title message.
  • attachment: An optional png/jpeg image attachment.
  • device: Optionally specify a specific device to send it to.
  • url: An optional supplementary URL.
  • url_title: An optional title for the supplementary URL.
  • priority: The priority at which the message is sent.
  • sound: The sound that plays when the notification arrives.
  • timestamp: The UNIX timestamp that the message is marked with.
  • retry: Number of seconds to retry sending a priority 2 message.
  • expire: Number of seconds when to stop retrying to send a priority 2 message.

Glance

  • title: An optional title for the Glance.
  • text: A line of text to display with the Glance.
  • subtext: A second line of text to display with the Glance.
  • count: The number to display on the Glance widget.
  • percent: The percentage to display on the Glance widget.

Examples

A simple example to send a message through the API:

from pushover import Client, Message
client = Client("user_token", "api_token")
msg = Message("This is a sample message!", title="Howdy!")
r = client.send(msg)
print(r.status_code)
# 200 if sent correctly 

A simple way to send a Glance through the API:

from pushover import Client, Glance
client = Client("user_token", "api_token")
glance = Glance(title="Howdy!", count=100, percent=84)
r = client.send(glance)
print(r.status_code)
# 200 if sent correctly

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

pushover-nythepegasus-1.0.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

pushover_nythepegasus-1.0.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file pushover-nythepegasus-1.0.1.tar.gz.

File metadata

  • Download URL: pushover-nythepegasus-1.0.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.2

File hashes

Hashes for pushover-nythepegasus-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4996f0c643c580248e38313a89823071220a371151fbd17ab34d925f9fbef770
MD5 9dd59b8308ecc60479dff28c34e3c910
BLAKE2b-256 e2a5824059503964d60224923c66140351c1375c965a37c652ef19324aaf9d3e

See more details on using hashes here.

File details

Details for the file pushover_nythepegasus-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pushover_nythepegasus-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.2

File hashes

Hashes for pushover_nythepegasus-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 03c34272f0f53693386ed7921d442dab062ea2002fa6c02ca06b769d6c2f3b95
MD5 2bcc9b36bef36ea655df4a15a988eed1
BLAKE2b-256 e8a6dc89172b5819fbc2ea5a2f61a0d682045cc2df0fb93b7f3ebe385c3b4c2f

See more details on using hashes here.

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