Skip to main content

Asynchronous Apple Push Notification Service Client

Project description

AAPNS

CircleCI Documentation Status

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


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)

Uploaded Source

Built Distribution

aapns-20.4-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

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

Hashes for aapns-20.4.tar.gz
Algorithm Hash digest
SHA256 321b3c836ac828b642f47708c8cad6df85cfb7e845faaa11d756233af956be18
MD5 079597da0da6e2bdf51e31e071f3b884
BLAKE2b-256 1e110423fe4d92e632b94faa8112775b55b6d753cfd50fdcf79ee705cb25414d

See more details on using hashes here.

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

Hashes for aapns-20.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ec7b3c690734f349bf4c03f6a4c6e40c8d0a4debf41007909f71bf6597d8a411
MD5 a89ef1dd14362ae74cb9789d2d64a4a9
BLAKE2b-256 e55c810f14f8bde72dcc1f84f01264f8b0de0b8965ed18076bb808668f429bc2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page