Asynchronous Apple Push Notification Service Client
Project description
AAPNS
Asynchronous Apple Push Notification Service client.
- Requires TLS 1.2 or better
- Requires Python 3.8 or better
Quickstart
from aapns.api import Server
from aapns.config import Priority
from aapns.models import Notification, Alert, Localized
async def send_hello_world():
client = await Server.production('/path/to/push/cert.pem').create_client()
apns_id = await client.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 client.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
aapns-20.7-py3-none-any.whl
(16.4 kB
view details)
File details
Details for the file aapns-20.7-py3-none-any.whl
.
File metadata
- Download URL: aapns-20.7-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e004b4056d0b9abe376b718328df47f7e534edfa18408fd24a2ae8c3c47146b |
|
MD5 | 47066e3e2333da9fa3a4731b3ebf2a39 |
|
BLAKE2b-256 | 77a624390766c760cab7fff29efdfc8e0a370600e9a6e0d885d79084225f1ee8 |