Last active
February 7, 2016 20:47
-
-
Save kumekay/859e9d1947df858dd4d4 to your computer and use it in GitHub Desktop.
Pushbullet snippet for python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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