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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pushover-nythepegasus-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a0a0a0da7e1e284df52b53158cfb43f14a798582c7ce590904e61380b9a97a8 |
|
MD5 | 64a8b116f7261d15a39054fc51112ebd |
|
BLAKE2b-256 | 7b302a5be18bbaeef8a0cc9ec9e724639c7e3848aad416f16409fd614eae7370 |
Close
Hashes for pushover_nythepegasus-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c0337c581eaee5e7314c2735bdc6cd9018f410fa47b531a8e91ca4142914a66 |
|
MD5 | a931a5e4e922433b28d12fc87aae4e47 |
|
BLAKE2b-256 | 528cd5a67bc265c1d5f0746e1faee2ec1db2e340bcee53b6ff41c294fe0bc8f2 |