innovationbad.blogg.se

Pushbullet api python
Pushbullet api python








These are the same parameters that push_file take. Upload_file returns a dictionary containing file_type, file_url and file_name keys. upload_file ( pic, "picture.jpg" ) push = pb. with open ( "my_cool_picture.jpg", "rb" ) as pic : file_data = pb. First you need to upload the file, and after that you can push it like you would anything else. push_link ( "Cool site", "" ) Pushing a file push_list ( "Shopping list", to_buy ) Pushing a link push = pb. push_address ( "home", address ) Pushing a list to_buy = push = pb. Pushing an address address = " 25 E 85th St, 10028 New York, NY" push = pb. Push is a dictionary containing the data returned by the Pushbullet API. push_note ( "This is the title", "This is the body" )

pushbullet api python

Pushing things Pushing a text note push = pb. If your key is invalid (that is, the Pushbullet API returns a 401), an InvalidKeyError is raised. Usage Authentication from pushbullet import Pushbullet pb = Pushbullet ( api_key ) The easiest way is to just open your favorite terminal and type pip install pushbullet.pyĪlternatively you can clone this repo and install it with python setup.py install Requirements In order to use the API you need an API key that can be obtained

pushbullet api python

This is a python library for the wonderful










Pushbullet api python