Skip to content

Instantly share code, notes, and snippets.

@kumekay
Last active February 7, 2016 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kumekay/859e9d1947df858dd4d4 to your computer and use it in GitHub Desktop.
Save kumekay/859e9d1947df858dd4d4 to your computer and use it in GitHub Desktop.
Pushbullet snippet for python
# coding: utf-8
# ## Pushbullet routine
# usage:
#
# import sys
# sys.path.insert(0, '../tools')
# from tools.pushme import pushme
# pushme('anna', 'title', 'body')
# pushme('anna','accuracy', str(0.25))
from pushbullet import Pushbullet
users = {
"user1": "user1_key",
"ues2": "user2_key" }
def pushme(user, title, body):
if user in users:
pb = Pushbullet(users[user])
push = pb.push_note(title, body)
else:
print("Unknown user")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment