Skip to main content

Pusher Push Notifications Python server SDK

Project description

Full documentation for this SDK can be found here

Installation

The Pusher Notifications Python server SDK is available on PyPi here.

You can install this SDK by using pip:

$ pip install pusher_push_notifications

Usage

Configuring the SDK for Your Instance

Use your instance id and secret (you can get these from the dashboard) to create a PushNotifications instance:

from pusher_push_notifications import PushNotifications

pn_client = PushNotifications(
    instance_id='YOUR_INSTANCE_ID_HERE',
    secret_key='YOUR_SECRET_KEY_HERE',
)

Publishing a Notification

Once you have created your PushNotifications instance you can publish a push notification to your registered & subscribed devices:

response = pn_client.publish(interests=['hello'], publish_body={'apns': {'aps': {'alert': 'Hello!'}}})

print(response['publishId'])

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

pusher_push_notifications-0.9.1.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file pusher_push_notifications-0.9.1.tar.gz.

File metadata

File hashes

Hashes for pusher_push_notifications-0.9.1.tar.gz
Algorithm Hash digest
SHA256 5a4e4ac56ccf4ad15056ac2410a70d88ade04114ab054e1a85eca98e7b818afc
MD5 8e764937216e1a611de1df8c821486f0
BLAKE2b-256 d8a956354f35f4a17bf83f01570be3d301ae44c7ae72da8717e3ff3272ec83c8

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