A python package for easy interaction with https://pushnotifier.de/
Project description
PushNotifier (V2) for Python
A python module to easily use the service of PushNotifier in your python projects.
You can find the documentation here.
About
Easily send
- messages ✉️
- urls 🌎
- images 🖼️
via python to all your devices. For more info visit pushnotifier.de
Installation
-
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
Usage
from pushnotifier import PushNotifier
pn = PushNotifier('username', 'password', 'package_name', 'api_key')
Sending messages
>>> 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'])
Get Basic information
>>> 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']
Refresh app token
>> > pn.refresh_token()
'new_token'
More detailed help
See the documentation or
>>> help(pn.some_method_you_need_help_on)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pushnotifier-1.3.0.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for pushnotifier-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e18d5f5ad5053a7e8b80d168804a5f5c76a6a2da3b3cb5815f28007381e5bf25 |
|
MD5 | 6f607556e62c9374d293e4cf86327d65 |
|
BLAKE2b-256 | 5a495cd202c5eee7f8762ae1de7cc690178ac5fc66ca430aca3a6f14f8d66eaa |