Skip to main content

Wrapper of huawei cloud messaging (Push Kit) for sending push notification using python.

Project description

Python Huawei Cloud Messaging

Wrapper of huawei cloud messaging (Push Kit) for sending push notification using python.

Home page

https://pypi.org/project/pyhcm/

Install

pip install pyhcm

Example

Send notification to topic

CLIENT_ID = "00000000"
CLIENT_SECRET = "0000000000000000000000000000000000000000000000000000000000000000"

HCMNotification(CLIENT_ID, CLIENT_SECRET).notify_topic_subscribers('test_topic', 'test title', 'test body')

Send notification to user

CLIENT_ID = "00000000"
CLIENT_SECRET = "0000000000000000000000000000000000000000000000000000000000000000"

HCMNotification(CLIENT_ID, CLIENT_SECRET).notify_single_device('token_xyz', 'test title', 'test body')

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

pyhcm-1.0.6.4.tar.gz (2.6 kB view hashes)

Uploaded Source

Supported by

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