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

Uploaded Python 2 Python 3

File details

Details for the file aapns-19.2-py2.py3-none-any.whl.

File metadata

  • Download URL: aapns-19.2-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.30.0 CPython/3.7.1

File hashes

Hashes for aapns-19.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7ede4b4aa16a9870c227c7ce388de271263dd39819a236e78eb472e4138c96bb
MD5 4ec78d429494d6a31075452969596e9e
BLAKE2b-256 715ece6210bd2434ae11df8b78e74c5dffa86f1db6d83b6369643370b924d39e

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