Asynchronous Apple Push Notification Service client
Project description
AAPNS
Asynchronous Apple Push Notification Service client.
Quickstart
from aapns import connect, Notification, Alert, Production, Localized
from aapns.config import Priority
async def send_hello_world():
connection = await connect('/path/to/push/cert.pem', Production)
apns_id = await connection.send_notification(
'my-device-token',
Notification(
alert=Alert(
body=Localized(
key='Hello World!',
args=['foo', 'bar']
),
),
badge=42
),
priority=Priority.immediately
)
print(f'Sent push notification with ID {apns_id}')'
await connection.close()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.