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.1.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.1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: skip_onesignal_client-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 92cd8d00841f3c920a0240f049d60ad914c85f9e865f6a79d517fe0d7ba9cc4f
MD5 dae3acc57840b5affd41f17d068107ab
BLAKE2b-256 f0322ec6c5b21c64e86bf86d6e58027e9f4bbf1c8cc9bad72c8eb941afe883c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for skip_onesignal_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6bfb6b1b4d69ec78077c8115f2c1ca2c7c8053927b5414f61ea258f9647ad7a0
MD5 f819bad9d114367f6afc75f95b15a6a9
BLAKE2b-256 a470f7b5552bb86dbd72d2dc168ff65756607efd7d2a4f214e940dea2d877a21

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