◐ Shell
clean mode source ↗

GitHub - franckb/python-mpns: Python module for Microsoft Push Notification Service

Python module for Microsoft Push Notification Service (MPNS) for Windows Phone.

It supports Toast, Tile and Raw notification formats (the latter one is not tested yet).

from mpns import MPNSTile, MPNSToast, MPNSRaw

uri = 'http://db3.notify.live.net/throttledthirdparty/01.00/ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
toast = MPNSToast()
tile = MPNSTile()

toast.send(uri, {'text1': 'Hello', 'text2': 'Windows Phone'})
toast.send(uri, {'text1': 'Tap this message', 'text2': 'To open application'})

tile.send(uri, {'title': 'Tile title'}