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.
Built Distribution
File details
Details for the file aapns-19.1-py2.py3-none-any.whl
.
File metadata
- Download URL: aapns-19.1-py2.py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 922ef04e5bdc7037ca1c6de29b9f428e3e077acfd2ebbb913a5a87fc4dc967df |
|
MD5 | 1b4f1fbb0c940052a4dd1aed895537f2 |
|
BLAKE2b-256 | 796d1e460e6630bea4f2402414e3681ac37f1a9116f554ca78c71ca56eae8122 |