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.
Source Distribution
Built Distribution
File details
Details for the file onesignal-notifications-0.2.6.tar.gz
.
File metadata
- Download URL: onesignal-notifications-0.2.6.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8d24ab69865778820e3c4170f45dc032aa6caf8f29bc06058b8bdcc79ad9398 |
|
MD5 | 9a542f5130aabceff4948fb6770cec2a |
|
BLAKE2b-256 | 81ad696475caa245201deee69f4c2ea146babe0f7aa7cd377a5a5a029ac1c196 |
File details
Details for the file onesignal_notifications-0.2.6-py3-none-any.whl
.
File metadata
- Download URL: onesignal_notifications-0.2.6-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6be4a7e862f650e9d622af9da526c7236c95a20cb8d7731e527b7a75f3a12a2 |
|
MD5 | 54c2a524d769ff86653d57f7981fe91b |
|
BLAKE2b-256 | 465322a27313a1ec222e5b0426d0ed96d0939809987a67f56a7d4183e4f47e7f |