Easy-to-use Web Push Notification Library
Project description
Easy-to-use Python Web Push Notification Library
Installation
Install with pip:
$ pip install python-webnoti
Usage
To send a notification:
from webnoti import send_notification, get_private_key
send_notification(subscription, "Hello from server") # For Firefox
send_notification(subscription, "Hello from server", # For Chrome
'mailto:admin@example.com', get_private_key('privkey.pem', generate=True))
# subscription can be obtained from the client.
To manually generate private key:
from webnoti import get_private_key
get_private_key('privkey.pem', b'password', generate=True)
This will generate private key named privkey.pem with password password (None if not encrypted) in current working directory.
Check out python-webnoti-example for the full example.
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
python-webnoti-0.4.0.tar.gz
(6.8 kB
view hashes)
Built Distribution
Close
Hashes for python_webnoti-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f44be9dae943b8e79429e33861db3ed0e35343a9f831b69d7f4175fa1b7bfb04 |
|
MD5 | 1b953b39953e7d5a1354d552a6c97e04 |
|
BLAKE2b-256 | 3833d40caa26da2fe6e8da753242a1b2a13dfbd5ad65cd2d69dda134f9760723 |