Skip to main content

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.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

python_webnoti-0.4.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file python-webnoti-0.4.1.tar.gz.

File metadata

  • Download URL: python-webnoti-0.4.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

File hashes

Hashes for python-webnoti-0.4.1.tar.gz
Algorithm Hash digest
SHA256 3e40cc682e937bd734e3ed71f1c25547b74d4f286575f9c60f274465c1e92df9
MD5 9028d614544be7af5b4c341a829fa41c
BLAKE2b-256 9875b64e08bc517a578514b5ceae6722209e19234aad1f426482ddc8aca636c9

See more details on using hashes here.

File details

Details for the file python_webnoti-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: python_webnoti-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

File hashes

Hashes for python_webnoti-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d3ce6bd7af486697c4bb091672af9cd5eee546962fcf17525c93ffc228801dda
MD5 91a450feea8a7e821ea5465bfb4dd8f1
BLAKE2b-256 bf2ad19ca354b0041c87d827e9dc1808cc56a3a4bdcb987c8824242a4fab6d20

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page