Skip to main content

Asynchronous Apple Push Notification Service client

Project description

AAPNS

CircleCI Documentation Status

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


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-19.1-py2.py3-none-any.whl (9.4 kB view details)

Uploaded Python 2 Python 3

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

Hashes for aapns-19.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 922ef04e5bdc7037ca1c6de29b9f428e3e077acfd2ebbb913a5a87fc4dc967df
MD5 1b4f1fbb0c940052a4dd1aed895537f2
BLAKE2b-256 796d1e460e6630bea4f2402414e3681ac37f1a9116f554ca78c71ca56eae8122

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