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 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aapns-23.7.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

aapns-23.7-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file aapns-23.7.tar.gz.

File metadata

  • Download URL: aapns-23.7.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for aapns-23.7.tar.gz
Algorithm Hash digest
SHA256 e0ae15db36b35dc76b07b588259068fafdcd38be8684d5d3807dddd6b450de1f
MD5 c5b255ea306c3885a299f227bf706335
BLAKE2b-256 3ae0b0828a1ac432ea8254f8fd8c61baf80747abe65248a075e8ecae0c843487

See more details on using hashes here.

File details

Details for the file aapns-23.7-py3-none-any.whl.

File metadata

  • Download URL: aapns-23.7-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for aapns-23.7-py3-none-any.whl
Algorithm Hash digest
SHA256 70929f9a619b1cb53f04868b90a537e342ad659f4b7506850a6a38b1c38ff05a
MD5 55470ba8238f506158ca59a242646c67
BLAKE2b-256 a759a7c64e1411d356026f385c0035c7dcf9de118e9acdf3a637efec6af9549a

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