firkeuf 1c16d81e46 Update client.py
should add force_proto else get proto = None and crash

hyper/http20/connection.py", line 354
assert proto in H2_NPN_PROTOCOLS or proto == H2C_PROTOCOL
2016-05-13 14:08:55 +03:00
2016-05-13 14:08:55 +03:00
2016-03-26 13:58:41 +03:00
2016-02-09 15:39:29 +03:00
2016-02-01 14:26:47 +03:00

PyAPNs2

Python library for interacting with the Apple Push Notification service (APNs) via HTTP/2 protocol

Installation

Either download the source from GitHub or use easy_install:

$ easy_install apns2

Sample usage

from apns2.client import APNsClient
from apns2.payload import Payload

token_hex = 'b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b87'
payload = Payload(alert="Hello World!", sound="default", badge=1)
client = APNsClient('key.pem', use_sandbox=False, use_alternative_port=False)
client.send_notification(token_hex, payload)

Further Info

iOS Reference Library: Local and Push Notification Programming Guide

License

PyAPNs2 is distributed under the terms of the MIT license.

See LICENSE file for the complete license details.

S
Description
No description provided
Readme
161 KiB
Languages
Python 100%