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
Built Distribution
Close
Hashes for onesignal-client-0.0.1.linux-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d8a261b2d075a116039c4e3529416318b1378ce1b1c2fed1977f5dd96b041a3 |
|
MD5 | 2a61bbf24449378d0176c2b27beea76a |
|
BLAKE2b-256 | ccf6da7762b089e2424c5e65415aefe00b02206799e7b7455540034054e5666c |
Close
Hashes for onesignal_client-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 892cdc13c1b48148880a8f6f902807f6625a7707cd14eaa16490b87d0826c7c0 |
|
MD5 | 13ff9ab1a7e9e9386597429563254883 |
|
BLAKE2b-256 | 4810b8606c660bb1a373469305f7e7966acdef90903fbef4e941d81033aaf9cc |