simplepush


Namesimplepush JSON
Version 2.2.3 PyPI version JSON
download
home_page
SummarySimplepush Python Library
upload_time2023-04-13 18:49:16
maintainer
docs_urlNone
author
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Python module to send push notifications via [Simplepush](https://simplepush.io/).

# Installation
```bash
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`:
```python
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:
```python
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:
```python
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:
```python
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'}])
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "simplepush",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "Timm Schaeuble <contact@simplepush.io>",
    "download_url": "https://files.pythonhosted.org/packages/5b/7c/2d14b9571b6dd630023606d1a8de51343a03e661a009b8af3c38f3de03b3/simplepush-2.2.3.tar.gz",
    "platform": null,
    "description": "Python module to send push notifications via [Simplepush](https://simplepush.io/).\n\n# Installation\n```bash\npip3 install simplepush\n```\n\n# Examples\nAll examples can be made asynchronous by using `async_send` instead of `send`.\n\n* Send a push notification to the Simplepush key `YourKey`:\n```python\nimport simplepush\nsimplepush.send(key='YourKey', title='Notification title', message='Notification message')\n```\n\n* Send a push notification with actions and a callback function that will print the selected action:\n```python\nimport simplepush\n\ndef callback(action_selected, action_selected_at, action_delivered_at, feedback_id):\n  print(action_selected)\n\nsimplepush.send(key='YourKey', title='Title', message='Actionable notification', actions=['yes', 'no', 'maybe'], feedback_callback=callback)\n```\n\n* 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:\n```python\nimport simplepush\n\ndef callback(action_selected, action_selected_at, action_delivered_at, feedback_id):\n  print(action_selected)\n\nsimplepush.send(key='YourKey', password='password', salt='salt', message='Actionable notification', actions=['yes', 'no', 'maybe'], feedback_callback=callback, feedback_callback_timeout=120)\n```\n\n* Send an end-to-end encrypted push notification with an image and a video file:\n```python\nimport simplepush\nsimplepush.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'}])\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Simplepush Python Library",
    "version": "2.2.3",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "211e43aaefeb1d19b333f990f77230d93f6314f8894a07b3d444acd3d5b1d675",
                "md5": "d40718dcf85b33879aa198872c1c3ace",
                "sha256": "ed9b75bc0b24a6100ca5af3469dac75a9ab43f9b24fffd29ba8a5e770213f1e8"
            },
            "downloads": -1,
            "filename": "simplepush-2.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d40718dcf85b33879aa198872c1c3ace",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5723,
            "upload_time": "2023-04-13T18:49:14",
            "upload_time_iso_8601": "2023-04-13T18:49:14.391453Z",
            "url": "https://files.pythonhosted.org/packages/21/1e/43aaefeb1d19b333f990f77230d93f6314f8894a07b3d444acd3d5b1d675/simplepush-2.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5b7c2d14b9571b6dd630023606d1a8de51343a03e661a009b8af3c38f3de03b3",
                "md5": "7ffaa1c6c4bc6ecc70099731ad62c450",
                "sha256": "edf697c4fa2152a71d1ffbf1f3591e793d631d3c80f545fc622319a3af8c2c71"
            },
            "downloads": -1,
            "filename": "simplepush-2.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "7ffaa1c6c4bc6ecc70099731ad62c450",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5443,
            "upload_time": "2023-04-13T18:49:16",
            "upload_time_iso_8601": "2023-04-13T18:49:16.956049Z",
            "url": "https://files.pythonhosted.org/packages/5b/7c/2d14b9571b6dd630023606d1a8de51343a03e661a009b8af3c38f3de03b3/simplepush-2.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-13 18:49:16",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "simplepush"
}
        
Elapsed time: 0.05313s