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
Metadata
Release files for pushover-nythepegasus 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pushover-nythepegasus-1.0.1.tar.gz | 5.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pushover_nythepegasus-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.0 kB
Release files / pushover-nythepegasus-1.0.1.tar.gz
| Download URL | pushover-nythepegasus-1.0.1.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4996f0c643c580248e38313a89823071220a371151fbd17ab34d925f9fbef770
|
|
BLAKE2b-256 checksum How to use checksums |
e2a5824059503964d60224923c66140351c1375c965a37c652ef19324aaf9d3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / pushover_nythepegasus-1.0.1-py3-none-any.whl
| Download URL | pushover_nythepegasus-1.0.1-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
03c34272f0f53693386ed7921d442dab062ea2002fa6c02ca06b769d6c2f3b95
|
|
BLAKE2b-256 checksum How to use checksums |
e8a6dc89172b5819fbc2ea5a2f61a0d682045cc2df0fb93b7f3ebe385c3b4c2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|