Skip to content
Python library to interface with PushBullet
Branch: master
Clone or download
Azelphur Merge pull request #37 from Lyude/pull/dismiss
Add PushBullet.dismissEphemeral()
Latest commit d230d80 May 2, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.
pushbullet Add PushBullet.dismissEphemeral() May 1, 2016
.gitignore Ignore .pyc files Jan 26, 2014
LICENSE Add a text copy of the GPL license Apr 30, 2016 Make python-magic dependency actually optional Apr 29, 2016 Make python-magic dependency actually optional Apr 29, 2016


Python library to interface with PushBullet

My friend showed me PushBullet, I liked it. I like Python, combine the two to achieve greatness.

You will need...

  • Python (2 or 3 should be fine)


If you install pyPushBullet via pip install git+ the dependencies should be install automatically.

However, if you want to install manually, you will need:

  • websocket-client - pip install websocket-client
  • requests - pip install requests

And for automatic file type detection for pushFile (optional):

  • python-magic - pip install python-magic

You can get your API Key from

Using the library:

from pushbullet.pushbullet import PushBullet

p = PushBullet(apiKey)
# Get a list of devices
devices = p.getDevices()

# Get a list of contacts
contacts = p.getContacts()

# Send a note
p.pushNote(devices[0]["iden"], 'Hello world', 'Test body')

# Send a map location
p.pushAddress(devices[0]["iden"], "Eiffel tower", "Eeiffel tower, france")

# Send a list
p.pushList(devices[0]["iden"], "Groceries", ["Apples", "Bread", "Milk"])

# Send a link
p.pushLink(devices[0]["iden"], "Google", "")

# Send a file
p.pushFile(devices[0]["iden"], "file.txt", "This is a text file", open("file.txt", "rb"))

# Send a note to a channel
p.pushNote('channel_tag', 'Hello world', 'Test body', recipient_type='channel_tag')

# Send a note to an email
p.pushNote('', 'Hello world', 'Test body', recipient_type='email')

Using the command line tool:

./ YOUR_API_KEY_HERE getdevices
./ YOUR_API_KEY_HERE note udeCmddJpl "Hello World" "Test Body"
./ YOUR_API_KEY_HERE address udeCmddJpl "Eiffel tower" "Eeiffel tower, france"
./ YOUR_API_KEY_HERE list udeCmddJpl Groceries Apples Bread Milk
./ YOUR_API_KEY_HERE link udeCmddJpl Google
./ YOUR_API_KEY_HERE file udeCmddJpl test.jpg
./ YOUR_API_KEY_HERE note "#channel_tag" "Hello World" "Test Body"

Questions? Comments? Feel free to drop me a line on IRC, #azelphur

You can’t perform that action at this time.