Pusher Push Notifications Python server SDK
Project description
Pusher Beams Python server SDK
Full documentation for this SDK can be found here
Installation
The Pusher Beams 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 Beams 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 Beams 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!'}}, 'fcm': {'notification': {'title': 'Hello', 'body': 'Hello, World!'}}}
)
print(response['publishId'])
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pusher_push_notifications-1.0.1.tar.gz.
File metadata
- Download URL: pusher_push_notifications-1.0.1.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0107a5d4c1c5d0225f173eedd2395c9bf142afe9eb805f22388e7d8b5cd77487
|
|
| MD5 |
432567d20f29ad20ef70fb3930dd8c0a
|
|
| BLAKE2b-256 |
2482f4fc2fd70f563213955961cc49b9a4a05321ede7478d136671d98d042f3d
|
File details
Details for the file pusher_push_notifications-1.0.1-py2.py3-none-any.whl.
File metadata
- Download URL: pusher_push_notifications-1.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1838a117c1c4f3c229435b348d3e34bdc0dee7d6646cfcdb698db0ad2534d33b
|
|
| MD5 |
340a84824076e6c5dfa36a08c5b94a65
|
|
| BLAKE2b-256 |
daffb21fd4ac461cb09026244b94dc984344139dc010ed36434b8b0044333423
|