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 create_client
from aapns.config import Priority, Production
from aapns.models import Notification, Alert, Localized
async def send_hello_world():
client = await create_client('/path/to/push/cert.pem', Production)
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 Distribution
aapns-20.4.tar.gz
(13.5 kB
view details)
Built Distribution
aapns-20.4-py3-none-any.whl
(15.2 kB
view details)
File details
Details for the file aapns-20.4.tar.gz
.
File metadata
- Download URL: aapns-20.4.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Darwin/19.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 321b3c836ac828b642f47708c8cad6df85cfb7e845faaa11d756233af956be18 |
|
MD5 | 079597da0da6e2bdf51e31e071f3b884 |
|
BLAKE2b-256 | 1e110423fe4d92e632b94faa8112775b55b6d753cfd50fdcf79ee705cb25414d |
File details
Details for the file aapns-20.4-py3-none-any.whl
.
File metadata
- Download URL: aapns-20.4-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Darwin/19.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec7b3c690734f349bf4c03f6a4c6e40c8d0a4debf41007909f71bf6597d8a411 |
|
MD5 | a89ef1dd14362ae74cb9789d2d64a4a9 |
|
BLAKE2b-256 | e55c810f14f8bde72dcc1f84f01264f8b0de0b8965ed18076bb808668f429bc2 |