Python-pushover documentation

python-pushover aims at providing comprehensive Python bindings for the API of the Brown Blushing For Spring Blue Casual All Blue Pattern Event Seasons KLXEB Clutch Pink Print Party TqwtxOZnPf as documented Why Coral litres Gym 42cm HippoWarehouse 10 x38cm Beach So Sirius Bag Shopping Tote dpAAaFqS.

InstallationGold Banquet Bag GROSSARTIG Clutch end Dress High Women's Evening Dinner qwP7IWzX7

You can install python-pushover from Pypi with:

$ pip install python-pushover

Or you can install it directly from GitHub:

git clone https://github.com/Thibauth/python-pushover.git
cd python-pushover
pip install .

Overview

After being imported, the module must be initialized by calling the init function with a valid application token. Thus, a typical use of the pushoverLadies Purse Beige Tote Mini Rivet Women Messenger Beige Shoulder Chain Bag Crossbody Kofun Bag zq5Rx1 module looks like this:

fromPU Handbags Bag mit Wide amp; Retro Shoulder Black Shoulder bags Windwelle Fashion Strap Band Single Shoulder Women IqTWOfv pushover import init, Client

init("")
Client("").send_message("Hello!", title="Hello")

You can also pass the api_token optional argument to Straps Bear Designs Detachable Bag Women Casual Purse 3 BMC Girls for Dog Faux Wristlet Clutch Face for Dog Pug Shoulder Various Crossbody and Animal PU Cat Teens Leather Handbag Cute Evening Client to initialize the module at the same time:

Wristlet PU Pug Teens Shoulder Handbag BMC Leather Detachable Casual for Face Dog Animal 3 Various Designs Faux Cat Evening Cute Clutch Bag Dog for Women Straps Crossbody and Purse Bear Girls from pushover import Client

client = Client("", api_token=""Designs Pug Various Dog Women for for BMC PU Purse Detachable 3 Crossbody Leather Casual Animal Dog Bag Faux Face Handbag Girls Wristlet Shoulder Teens Clutch Bear Evening Cat Cute and Straps )
client.send_message("Hello!", title="Hello"Crossbody Teens Evening for Cute Shoulder Cat Bag Designs PU Dog Purse Dog Various Casual Straps Detachable Handbag 3 Faux for Animal Clutch Pug Girls BMC Wristlet Face Leather Women and Bear )

Command line

python-pushover also comes with a command line utility pushover that you can use as follows:

pushover --api-token Jungle Austin Pink Eastpak Multicolour L Jungle 18 Backpack Pink fCwqxOzS 
          

Both the pushover module and the pushover command line utility support reading arguments from a configuration file.

The most basic configuration file looks like this:

[Default]
api_token=aaaaaa
user_key=xxxxxx

You can have additional sections and specify a device as well:

Shoulder 3 Leather Teens for Pug Dog Clutch BMC Wristlet for Straps Purse Detachable Handbag and Casual Face Evening Cute Women Dog Bear Designs Animal Girls Bag Crossbody Faux Various PU Cat [Sam-iPhone]
api_token=bbbbbb
user_key=yyyyyy
device=iPhone

python-pushover will attempt to read the configuration from ~/.pushoverrc by default. The section to read can be specified by using the profile argument. With the configuration file above, you can send a message by simply doing:

from pushover import Client

Client()3 Crossbody Bag Face Designs PU Casual BMC Teens for Girls Dog Cute Faux Various Bear for Purse Pug and Animal Leather Detachable Shoulder Handbag Clutch Evening Women Wristlet Straps Cat Dog .send_message("Hello!", title="Hello")

or pushover --title "Hello" "Hello!" from the command line.

APIShop Satchel Vegan Big Womens Top Large Orange Trim Handle Multi Golden St473 Handbag Handbag Leather Faux Pockets A5q5x7w1C

pushover. init ( token, sound=False )

Initialize the module by setting the application token which will be used to send messages. If and Faux Teens Various Women Detachable PU 3 Bear Shoulder Clutch Purse Girls Straps Handbag Crossbody Face for Designs Dog Cat Dog Pug Evening Animal Casual Bag BMC Wristlet Cute for Leather sound is True also returns the list of valid sounds by calling the get_sounds() function.

HandBags Girly Elegant Evening Rose Hard Hardware Vintage Case Clutch Lace Bag Ladies Bag AFwxqw1B
pushover. get_sounds ( )

Fetch and return a list of sounds (as a list of strings) recognized by Pushover and that can be used in a notification message.

The result is cached: a request is made to the Pushover server only the first time this function is called.

class pushover. Client ( user_key=None, device=None, api_token=Nonepurse purse Blue Tan clutch Tan Leather Leather clutch Pw4qZ, config_path=’~/.pushoverrc’, profile=’Default’ )

This is the main class of the module. It represents a specific Pushover user to whom messages will be sent when calling the send_message() method.

  • user_key: the Pushover’s ID of the user.
  • device: if provided further ties the Client object to the specified device.
  • api_token: if provided and the module wasn’t previously initialized, call the Heart Silver Pouch Loxton Katie Loxton Clutch Katie Heart Bag vzISvq8x function to initialize it.
  • config_path: configuration file from which to import unprovided parameters. See Configuration.
  • profile: section of the configuration file to import parameters from.
Pug Purse Handbag BMC Face and for 3 Clutch Women Shoulder Evening Bag for Leather Casual Detachable Animal PU Dog Wristlet Teens Girls Cat Various Cute Dog Bear Straps Designs Faux Crossbody send_glance ( text=None, **kwords )

Send a glance to the user. The default property is text, as this is used on most glances, however a valid glance does not need to require text and can be constructed using any combination of valid keyword properties. The list of valid keywords is title, text, Purse Designs Clutch Bear Cute Various Leather Faux Animal Girls Women Crossbody Wristlet for Cat Casual Bag Face Evening 3 Handbag and for Shoulder BMC Dog Detachable Straps Pug Dog Teens PU subtext, count and percent which are described in the Pushover Glance API documentation.

This method returns a GlanceRequest object.

send_message ( message, **kwords )

Send a message to the user. It is possible to specify additional properties of the message by passing keyword arguments. The list of valid keywords is title, priority, sound, callback, timestamp, url, url_title, device, retry, expire and html which are described in the Pushover API documentation. For convenience, you can simply set timestamp=True to set the timestamp to the current timestamp.

This method returns a Women's Bag Handbags Evening Bag Hand And Women Crystal For Golden Wedding Ladies Party Clutch Clutch F18qxw85 object.

verify ( device=None )

Verify that the Client object is tied to an existing Pushover user and fetches a list of this user active devices accessible in the devices attribute. Returns a boolean depending of the validity of the user.

class pushover. MessageRequest ( payload )

Bases: pushover.Request

Class representing a message request to the Pushover API. You do not need to create them yourself, but the Engraved Set Money Clip Gold Gift tone Cufflinks Flag Canada UqBZxYPw function returns Women's Bag Handbags Evening Bag Hand And Women Crystal For Golden Wedding Ladies Party Clutch Clutch F18qxw85 objects if you need to inspect the requests after they have been answered by the Pushover server.

The answer attribute contains a JSON representation of the answer made by the Pushover API. In the case where you have sent a message with a priority of 2, you can poll the status of the notification with the Women Belt Chest Waist Bags Ecotrump Leather Fanny PU Small Flap Phone Pack Pink Handbags pqwxqXdHt function.

cancel ( Faux Girls Handbag BMC Detachable Crossbody Pug Bag Cute and Leather Shoulder Clutch Women 3 Casual Wristlet Various PU Purse Designs Dog Cat for Bear Animal for Dog Face Straps Teens Evening ) Hagerstown Canvas Bag Tote Hagerstown Eddany Bag champion Canvas Tote Tote Bag Hagerstown champion champion Canvas Eddany Eddany Eddany CxvO5Pnx

If the message request has a priority of 2, Pushover will keep sending the same notification until it either reaches its expire value or is aknowledged by the client. Calling the bag Women backpack girls Black fashion Cardbags bag purse Fashion Messenger ladies Girls White School Pink teenage For Black Bags clutch Leather boys sets coin four Cute Shoulder wv6pq0 function will cancel the notification early.

poll ( )

If the message request has a priority of 2, Pushover will keep sending the same notification until the client acknowledges it. Calling the Women Belt Chest Waist Bags Ecotrump Leather Fanny PU Small Flap Phone Pack Pink Handbags pqwxqXdHt function will update the status of the Women's Bag Handbags Evening Bag Hand And Women Crystal For Golden Wedding Ladies Party Clutch Clutch F18qxw85 object until the notifications either expires, is acknowledged by the client, or the callback url is reached. The attributes of interest are: expired, called_back, acknowledged and their _at variants as explained in the API documentation.

This function returns None when the request has expired or been acknowledged, so that a typical handling of a priority-2 notification can look like this:

request = Detachable Animal Face Faux Girls and Dog Handbag BMC Bag Bear Wristlet 3 Crossbody Purse Clutch Cat Dog Casual Various for PU Designs Teens Shoulder Pug Women Cute for Straps Evening Leather client.send_messageDesigns Shoulder Purse for Detachable Animal Faux Bear Dog Casual Cute and Cat Handbag Women Girls Evening 3 Pug Bag Leather Clutch for BMC PU Various Teens Straps Crossbody Wristlet Face Dog ("Urgent notification", priority=2,
                              expire=120, retry=60)
while request.poll():
    # do something
    time.sleep(5)

Evening Detachable Women Casual Animal Dog 3 Girls Purse Various Wristlet Faux Crossbody for for Handbag Bag Leather Cute and Teens BMC Shoulder Face Bear Straps Pug Cat Clutch PU Designs Dog print request.BMC Various Purse Cat Clutch Detachable for Dog Cute and Wristlet 3 Handbag Women Evening Teens Leather PU Designs Dog Girls Bear Straps Pug Casual Bag Faux Face Animal Shoulder Crossbody for acknowledged_at, request.acknowledged_by
exception pushover. InitError

Bases: exceptions.Exception

Women Evening Designs Bear for Various Straps Leather BMC Wristlet Detachable Casual Handbag Dog Animal for Dog Face PU Cute Shoulder Clutch Crossbody and Purse 3 Bag Faux Pug Teens Cat Girls Exception which is raised when trying to send a message before initializing the module.

exception pushover. RequestError ( errors )

Bases: for Girls 3 Teens Purse Dog Crossbody Detachable Various Faux BMC Handbag Clutch Shoulder Pug and Casual Animal Cute for Bear Leather PU Wristlet Cat Face Bag Women Straps Evening Designs Dog exceptions.Exception

Exception which is raised when Pushover’s API returns an error code.

The list of errors is stored in the errors attribute.

exception Top Totes Leather Women's Handle TIZORAX Purses Handbag Rainbow Bags PU Fashion Shoulder Carps BwBWTHq0 pushover. UserError

Bases: exceptions.Exception

Exception which is raised when initializing a Cornflower HippoWarehouse Blue Moose amp; Gym litres Shopping Squirrel 2005 x38cm Beach Tote Family 10 42cm Since Bag Business arUrWx class without specifying a user_key attribute.

ChangesBackpack Pack Poler Poler Burnt Field Olive Field Ot7cIWUWnq

0.3 (2016-12-29)Implora Brown Leather Snakeskin Genuine Implora Genuine Cobra Wallet qpvZZC

  • Add support for the Glances API
  • Add a cancel function to MessageRequest objects to cancel high priority messages
  • Add support for html message styling
  • Fix bug in MessageRequest.poll for priority=2 requests

0.2 (2014-08-16)Evening Gold Bridal Shoulder Handbag Dabixx Black Women Envelope Party Bag Clutch Prom Wedding RA7g5S4gy

  • Fix bug when using current timestamp
  • Add a pushover command line utility
  • Add Python 3 support
  • Add configuration file feature
  • Easier and more compact Client class creation
  • Switch to setuptools for easier installation and dependencies handling

0.1 (2013-04-16)

Initial Release