from apns_python import Alert, APS, Payload, Headers, Client
alert = Alert(
title='Notification Title',
body='A preview content from apn-python')
aps = APS(
alert=alert,
badge=1,
sound='sound.mp3')
payload = Payload(
aps=aps,
custom_fields=dict(
customized_field='some data'))
headers = Headers(
custom_fields={"Content-Type": "application/json; charset=utf-8"})
CHEM_APNS_CLIENT = Client(
push_mode='dev',
secure=True,
cert_location='/your/apns/certfile.pem',
cert_password='APNsCertPassword')
result = client.send(device_token, headers, payload)
print result
'''
forked from mr-ping/apns-python
-
Notifications
You must be signed in to change notification settings - Fork 0
A Python client for Apple Push Notification service(APNs)
License
leiyu0918/apns-python
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
A Python client for Apple Push Notification service(APNs)
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Python 100.0%