Skip to main content

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 onesignal-notifications 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

skip_onesignal_client-0.1.0.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skip_onesignal_client-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file skip_onesignal_client-0.1.0.tar.gz.

File metadata

  • Download URL: skip_onesignal_client-0.1.0.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for skip_onesignal_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 42872a469ba4b445c016469d040018865ec7123accc8dcaf229683cc4745e101
MD5 f70a9cb99a66c137e62a47dc4488964a
BLAKE2b-256 139e0146ce7c734ffce5430cdb42d6495d9b98e4aede1b14e422c8841c8d1767

See more details on using hashes here.

File details

Details for the file skip_onesignal_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for skip_onesignal_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c3fd9bb6129b4d243a700e9d7e8674ee4d4fe71c8905f4e29f7bdb1b31c6b71
MD5 f59eb14a124b883afc71b655620d7a6c
BLAKE2b-256 5cf2f62caf211bda1fe7a1421248c7483da95e3c362e48c2539254d2bf7b222d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page