Skip to content

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

License

Notifications You must be signed in to change notification settings

omelched/python-huawei-cloud-messaging

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Huawei Cloud Messaging

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

Home page

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

Install

pip install git+https://github.com/omelched/python-huawei-cloud-messaging

Example

Send notification to device

CLIENT_ID = "00000000"
CLIENT_SECRET = "0000000000000000000000000000000000000000000000000000000000000000"
PROJECT_ID = "000000000000000000"

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

Send notification to multiple devices

CLIENT_ID = "00000000"
CLIENT_SECRET = "0000000000000000000000000000000000000000000000000000000000000000"
PROJECT_ID = "000000000000000000"

HCMNotification(CLIENT_ID, CLIENT_SECRET, PROJECT_ID).notify_multiple_devices(['token_1', 'token_2'], 'test title', 'test body')

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%