module documentation

Minimal helper for sending notifications to mobile devices via the Pushover API.

Documentation:
https://pushover.net/api

Example

from PushoverClient import PushoverClient, sendNotification

sendNotification(
        token="YOUR_APP_TOKEN",
        user="YOUR_USER_KEY",
        message="a message",
        title="a title",
)

# Reusable client (avoids passing token/user each time)
client = PushoverClient(token='YOUR_APP_TOKEN', user='YOUR_USER_KEY')
client.sendNotification('Disk usage above 90%', title='Alert', priority=1, sound='siren')
Class PushoverClient A client for sending notifications to mobile devices via the Pushover API.
Exception PushoverError Raised when the Pushover API rejects a request or returns an error.
Function sendNotification Convenience one-off call - builds a client and sends immediately.
Constant PUSHOVER_API_URL URL for the Pushover API endpoint to send messages.
def sendNotification(token: str, user: str, message: str, **kwargs: Any) -> dict: (source)

Convenience one-off call - builds a client and sends immediately.

Parameters
token:strApplication/API token.
user:strUser or group key.
message:strThe message to send (max 1024 characters).
**kwargs:AnyAdditional keyword arguments for PushoverClient.sendNotification().
Returns
dictParsed JSON response from the Pushover API.
Raises
PushoverErrorIf the API returns an error or a non-200 status code
PUSHOVER_API_URL: str = (source)

URL for the Pushover API endpoint to send messages.

Value
'https://api.pushover.net/1/messages.json'