Skip to main content

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

Release files for onesignal-client 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for onesignal-client 0.0.2
File Size Uploaded
onesignal-client-0.0.2.tar.gz 105.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for onesignal-client 0.0.2
File Interpreter ABI Platform
onesignal_client-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 116.2 kB

Release files / onesignal-client-0.0.2.tar.gz

Download URL onesignal-client-0.0.2.tar.gz
Size 105.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b090b80c207646166e99502615fd1ea1349e43efb4fd3dec2b0b2d67f295a27a
BLAKE2b-256 checksum
How to use checksums
c6af301dc3235c411e0b301ef2c902f8ce3261c6f099a840bf037e71ba87497d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

Release files / onesignal_client-0.0.2-py3-none-any.whl

Download URL onesignal_client-0.0.2-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7829e8e8acb995bd76cb7c58217a386c593a8e47b19265bbb77332fc7d1155ac
BLAKE2b-256 checksum
How to use checksums
a3e77562f6b435282464d10928afc2e10d45d0d472dd14e10194c508ea0e3d7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page