OneSignal API Wrapper for Python
Project description
OneSignal-Notifications
OneSignal-Notifications is a wrapper for the OneSignal API which allows you to send notifications to Android, iOS and Web App.
Installation
pip install onesignal-notifications
Usage
from onesignal import OneSignal, SegmentNotification client = OneSignal("MY_APP_ID", "MY_REST_API_KEY") notification_to_all_users = SegmentNotification( contents={ "en": "Hello from OneSignal-Notifications" }, included_segments=[SegmentNotification.ALL] ) client.send(notification_to_all_users)
Development
Contributions are welcome
pip install --editable .
run the tests
export ONESIGNAL_API_KEY="..."
export ONESIGNAL_REST_API_KEY="..."
pytest
Docs
To edit the docs, change the folder and spin up the development server.
cd docs
npm install -g vuepress
vuepress dev
Meta
Lucas Hild - https://lucas-hild.de
This project is licensed under the MIT License - see the LICENSE file for details
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size onesignal_notifications-0.2.6-py3-none-any.whl (9.3 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size onesignal-notifications-0.2.6.tar.gz (7.5 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for onesignal_notifications-0.2.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6be4a7e862f650e9d622af9da526c7236c95a20cb8d7731e527b7a75f3a12a2 |
|
MD5 | 54c2a524d769ff86653d57f7981fe91b |
|
BLAKE2-256 | 465322a27313a1ec222e5b0426d0ed96d0939809987a67f56a7d4183e4f47e7f |
Close
Hashes for onesignal-notifications-0.2.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8d24ab69865778820e3c4170f45dc032aa6caf8f29bc06058b8bdcc79ad9398 |
|
MD5 | 9a542f5130aabceff4948fb6770cec2a |
|
BLAKE2-256 | 81ad696475caa245201deee69f4c2ea146babe0f7aa7cd377a5a5a029ac1c196 |