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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simplepush-2.2.4-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for simplepush-2.2.4.tar.gz
Algorithm Hash digest
SHA256 4698d089bbdcaa9962ce1c54e6add726818101088a84ec431a7492717a79da03
MD5 ab0f3e46e1b6412404a9e7454ed4a1a6
BLAKE2b-256 5bcefc46dcad892d864a81dec62af8956fb4fa1385c8f52aa929eead8175dce4

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for simplepush-2.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 99bb83cb95ad7221cdeaa7d7562ba4926740558c4659910608239eed0b355f4b
MD5 778f7716261b803e03e45e8f63d0738b
BLAKE2b-256 34792638950d8fa2d80bf68c4b3d24ea8abdcc41c0eccea1e0a28dc18debe21f

See more details on using hashes here.

Supported by

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