A python module to easily use the service of PushNotifier in your python projects.
You can find the documentation here.
Special thanks go to @Logxn.
Easily send
- messages ✉️
- urls 🌎
- images 🖼️
via python to all your devices. For more info visit pushnotifier.de
Note: you have to have requests
installed (pip install requests
)
-
Install PushNotifier via pip
$ pip install pushnotifier
-
Install PushNotifier manually
$ git clone https://github.com/tomg404/pushnotifier-python $ cd /path/to/repository/ $ python setup.py install
from pushnotifier import PushNotifier as pn
pn = pn.PushNotifier('username', 'password', 'package_name', 'api_key')
>>> pn.send_text('hello world', silent=False, devices=['abcd', 'efgh'])
>>> pn.send_url('https://www.example.com', silent=False, devices=['abcd', 'efgh'])
>>> pn.send_notification('hello world', 'https://www.example.com', silent=False, devices=['abcd', 'efgh'])
>>> # Note on send_image: currently you can't send images to android/ios devices
>>> pn.send_image('path/to/image.png', silent=False, devices=['abcd', 'efgh'])
>>> password = 'XXXXX'
>>> pn.login(password)
{'username': 'username', 'avatar': 'https://gravatar.com/avatar/XXXXX', 'app_token': 'XXXXX', 'expires_at': XXXXX}
>>> pn.get_all_devices()
['abcd', 'efgh', 'ijkl']
>>> pn.refresh_token()
'new_token'
See the documentation or
>>> help(pn.some_method_you_need_help_on)