Skip to main content

Simplepush Python Library

Project description

Python module to send push notifications via Simplepush.

Installation

pip3 install simplepush

Examples

All examples can be made asynchronous by using async_send instead of send.

  • Send a push notification to the Simplepush key YourKey:
import simplepush
simplepush.send(key='YourKey', title='Notification title', message='Notification message')
  • Send a push notification with actions and a callback function that will print the selected action:
import simplepush

def callback(action_selected, action_selected_at, action_delivered_at, feedback_id):
  print(action_selected)

simplepush.send(key='YourKey', title='Title', message='Actionable notification', actions=['yes', 'no', 'maybe'], feedback_callback=callback)
  • Send an end-to-end encrypted push notification with actions and a callback function that will print the selected action and times out after 120 seconds:
import simplepush

def callback(action_selected, action_selected_at, action_delivered_at, feedback_id):
  print(action_selected)

simplepush.send(key='YourKey', password='password', salt='salt', message='Actionable notification', actions=['yes', 'no', 'maybe'], feedback_callback=callback, feedback_callback_timeout=120)
  • Send an end-to-end encrypted push notification with an image and a video file:
import simplepush
simplepush.send(key='YourKey', message='Attachments', password='password', salt='salt', attachments=['https://upload.wikimedia.org/wikipedia/commons/e/ee/Sample_abc.jpg', {'video': 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4', 'thumbnail': 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/ForBiggerEscapes.jpg'}])

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

simplepush-2.2.3.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

simplepush-2.2.3-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file simplepush-2.2.3.tar.gz.

File metadata

  • Download URL: simplepush-2.2.3.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for simplepush-2.2.3.tar.gz
Algorithm Hash digest
SHA256 edf697c4fa2152a71d1ffbf1f3591e793d631d3c80f545fc622319a3af8c2c71
MD5 7ffaa1c6c4bc6ecc70099731ad62c450
BLAKE2b-256 5b7c2d14b9571b6dd630023606d1a8de51343a03e661a009b8af3c38f3de03b3

See more details on using hashes here.

File details

Details for the file simplepush-2.2.3-py3-none-any.whl.

File metadata

  • Download URL: simplepush-2.2.3-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for simplepush-2.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ed9b75bc0b24a6100ca5af3469dac75a9ab43f9b24fffd29ba8a5e770213f1e8
MD5 d40718dcf85b33879aa198872c1c3ace
BLAKE2b-256 211e43aaefeb1d19b333f990f77230d93f6314f8894a07b3d444acd3d5b1d675

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