OneSignal API wrapper
Project description
OneSignal client
OneSignal client is a wrapper for the OneSignal API which allows you to send notifications to Android, iOS and Web App.
It is based on library.
Installation
pip install onesignal-client
Usage
from onesignal import OneSignalClient, 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
onesignal-client-0.0.2.tar.gz
(105.7 kB
view hashes)
Built Distribution
Close
Hashes for onesignal_client-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7829e8e8acb995bd76cb7c58217a386c593a8e47b19265bbb77332fc7d1155ac |
|
MD5 | 8bd8825d8701be337d23284483e6ca91 |
|
BLAKE2b-256 | a3e77562f6b435282464d10928afc2e10d45d0d472dd14e10194c508ea0e3d7a |