aioapns
An efficient APNs Client Library for Python/asyncio
What it is and what it does
aioapns is an asyncio-based client library for sending push notifications to iOS devices through Apple's Push Notification Service. It wraps the APNs HTTP/2 API with an efficient connection pool and supports both certificate-based and token-based (JWT) authentication methods. The library integrates directly with Python's asyncio framework, making it suitable for high-throughput, non-blocking notification delivery in async applications.
The package handles the low-level details of APNs communication—HTTP/2 protocol negotiation via h2, TLS certificate management through pyOpenSSL, and JWT token generation with pyjwt—so you only need to construct a NotificationRequest with a device token and message payload, then await the send call. It supports production and sandbox APNs servers, TTL and priority settings, and collapse keys for notification grouping.
Use it for:
- Send real-time alerts and reminders to iOS app users from a Python backend service.
- Deliver high-volume push notifications (e.g., marketing campaigns) with connection pooling and async concurrency.
- Integrate APNs delivery into an asyncio-based microservice or event-driven architecture without blocking.
- Manage both certificate and token authentication flows for different APNs environments or team configurations.
- Set notification expiration (TTL) and priority levels for time-sensitive or background delivery scenarios.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
aioapns sends push notifications to iOS devices via Apple Push Notification Service using asyncio and HTTP/2, supporting both certificate and token-based authentication.
Yes. aioapns is production-stable, permissively licensed, and actively maintained with low install friction. It is the right choice if you need to send iOS push notifications from a Python asyncio application and want a focused, efficient HTTP/2 client rather than a generic push service abstraction. The aging maintenance status (487 days since last release) is not a blocker for a mature library with no known vulnerabilities, but monitor the repository for any future APNs protocol changes.
Install
aioapns on PyPI
pip
pip install aioapnsuv
uv add aioapnspoetry
poetry add aioapnsInstalling aioapns
Before you install
Low install friction with three straightforward runtime dependencies (h2, pyOpenSSL, pyjwt). Repository shows active maintenance with a recent commit on 2025-04-14, though the package is aging relative to its release cycle.
License in practice
Licensed under Apache License, Version 2.0 (permissive), allowing commercial and private use with minimal restrictions—suitable for most production deployments.
Quickstart
pip install aioapns
import asyncio
from aioapns import APNs, NotificationRequest
async def send():
client = APNs(client_cert='/path/to/cert.pem', use_sandbox=False)
request = NotificationRequest(
device_token='<TOKEN>',
message={"aps": {"alert": "Hello"}}
)
await client.send_notification(request)
asyncio.run(send())
Requires Python 3.8 or later; APNs certificate or token credentials (key file, key_id, team_id, topic) must be obtained from Apple Developer account.
Verify before relying
- Whether the stated 1.3k notifications per second throughput is still representative for version 4.0 under typical production loads.
- Current status of HTTP/2 connection pool adaptation behavior and whether it remains optimal for high-concurrency scenarios.
Package facts
| License | Apache License, Version 2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — h2, pyOpenSSL, pyjwt |
| Maintenance | aging — 487 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 848,474/month — #4,910 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aioapns-4.0-py3-none-any.whl
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
apns2-upSends push notifications to iOS devices through…
permissive · top 15,000 on PyPI
pyapns-clientSends Apple Push Notifications to iOS, macOS,…
permissive · top 5,000 on PyPI
urbanairshipPython library for integrating Airship's push…
permissive · top 15,000 on PyPI
aiosonicAn asyncio HTTP/1.1, HTTP/2, and WebSocket…
permissive · top 15,000 on PyPI
moonraker-apiFully async Python client for connecting to and…
copyleft · top 15,000 on PyPI
app-store-server-libraryProvides Python bindings to Apple's App Store…
permissive · top 5,000 on PyPI
django-push-notificationsA Django app that manages device registrations…
permissive · top 15,000 on PyPI
pywebpushEncrypts and sends web push notifications to…
copyleft · top 5,000 on PyPI
notifiersNotifiers provides a unified interface to send…
permissive · top 15,000 on PyPI
pyobjc-framework-PushKitProvides Python bindings to Apple's PushKit…
permissive · top 15,000 on PyPI