A python package for an easy use of the service from https://pushnotifier.de/
Project description
PushNotifier (V2) for Python
A python module to easily use the service of PushNotifier in your python projects. Special thanks go to @Logxn.
About
Easily send
- messages
- urls
- images
via python to all your devices. For more info visit pushnotifier.de
Installation
Note: you have to have requests installed (pip install requests)
- Install PushNotifier via pip
foo@bar:~$ pip install pushnotifier
- Install PushNotifier manually
foo@bar:~$ git clone https://github.com/tomg404/pushnotifier-python
foo@bar:~$ cd /path/to/repository/
foo@bar:~$ python setup.py install
Usage
from pushnotifier import PushNotifier as pn
pn = pn.PushNotifier('username', 'password', 'package_name', 'api_key')
Sending messages
>>> pn.send_text('hello world', silent=False)
>>> pn.send_url('https://www.example.com', silent=True)
>>> pn.send_notification('hello world', 'https://www.example.com') # by default silent is set to False
>>> pn.send_image('path/to/image.png')
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
>>> 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pushnotifier-1.2.1.tar.gz.
File metadata
- Download URL: pushnotifier-1.2.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9241856cc4f21740ffd20610cba2add3594750fe33b8fefe3eb9068d5896b05a
|
|
| MD5 |
bf8ef732c90f27a882ee7486a07bd372
|
|
| BLAKE2b-256 |
006e345b2bdf3c1ed1715f6bfb4e601b7cdb54be0ba3dfd269fbe8b78500faf3
|
File details
Details for the file pushnotifier-1.2.1-py3-none-any.whl.
File metadata
- Download URL: pushnotifier-1.2.1-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12919e8abed372d31d637dead0fce92997102915f9edbfbdb067a8d62c71a2bc
|
|
| MD5 |
0954ca945f5d8e7715487c84b72a57c6
|
|
| BLAKE2b-256 |
555b0d47be12ec6527f5ec828c05bbf47f1d193d87a5fd9d4d29eaae7a2c70b7
|