A small python script to interface with Pushbullet.
I wrote this because the existing python library for pushbullet did not support the v2 API.
The requests library is required. Use your OS defined method for including python libraries or pip install requests.
This is not a registered app and as such does not use OAuth2 to authenticate to Pushbullet. It requires the use of an API key.
You can obtain an API Key (sometimes known as an Access Token) on your Pushbullet Account Settings page.
Specify the API Key on the command line as --api-key <API_KEY>
or
add it to your ${HOME}/.netrc
:
machine pushbullet.com login EMAIL password API_KEY
One advantage of using a .netrc entry is that the login field in the pushbullet.com entry will be used as the default destination.
Remember to set restrictive permissions for your .netrc. Anyone who can see your API Key has access to your Pushbullet account.
Destinations can be an e-mail address, a device name, a device identifier, a channel name or a channel identifier.
You can only push to your private channels.
To list all your devices use
# pushbullet list devices
To list all your channels (including public channels you are subscribed to):
# pushbullet list channels
Most of these examples assume your .netrc is set up
# pushbullet --title Hello --note World
# pushbullet --dest my.friend@email.us --title Hello --note World
# pushbullet --dest 'Nexus 9' --title "A pretty picture" --file IMG0001.JPG
# pushbullet --dest mychannel --title "Look at this" --link "https://a.funny.url.com"
Make the object available as a python library and provide a cli script.
- Print more details on devices
- Allow rename of device
- Allow update icon of device
- Support texts
- Support encryption
Jeffrey C Honig jch@honig.net