From 830eab9e981b3ee9dbf153a35e376c888f159497 Mon Sep 17 00:00:00 2001 From: Sergey Petrov Date: Mon, 1 Feb 2016 14:25:31 +0300 Subject: [PATCH] Create README.md --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..34f9257 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# 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 + +```python +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_alternate_port=False) +client.send_notification(token_hex, payload) +``` + +## Further Info + +[iOS Reference Library: Local and Push Notification Programming Guide][a1] + +## License + +PyAPNs2 is distributed under the terms of the MIT license. + +See [LICENSE](LICENSE) file for the complete license details. + +[a1]:https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/Introduction.html