apns2-up
A python library for interacting with the Apple Push Notification Service via HTTP/2 protocol
What it is and what it does
apns2-up is a Python client library for sending push notifications to iOS devices via Apple's Push Notification service (APNs) over HTTP/2. It abstracts the complexity of APNs protocol handling and credential management, supporting both certificate-based authentication (via .pem files) and token-based authentication (via auth keys). The library depends on hyper-up for HTTP/2 transport, PyJWT for token signing, and cryptography for certificate handling.
The package is designed for server-side applications that need to deliver notifications to iOS apps. It supports single notifications and batch operations, allowing developers to send alerts, sounds, and badge updates. However, the package shows signs of age—last released 455 days ago with minimal repository activity—raising questions about ongoing maintenance and compatibility with current Apple APNs requirements.
Use it for:
- Send alert notifications to iOS users when server-side events occur (e.g., messages, reminders, activity updates).
- Deliver batch notifications to multiple iOS devices in a single operation for efficiency.
- Implement token-based authentication for APNs when certificate management is impractical.
- Build a notification service that manages badge counts and sound preferences per notification.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Sends push notifications to iOS devices through Apple's APNs service using HTTP/2, supporting both certificate-based and token-based authentication.
Yes, with caution. The library is functional and permissively licensed, but its aging status (455 days since last release, minimal repository activity) means you should verify compatibility with current Apple APNs requirements before production use. High install friction from three non-trivial dependencies is acceptable for the problem it solves. Consider checking whether the hyper-up dependency is actively maintained, as it is a critical transport layer.
Install
apns2-up on PyPI
pip
pip install apns2-upuv
uv add apns2-uppoetry
poetry add apns2-upInstalling apns2-up
Before you install
High install friction due to three non-trivial runtime dependencies (hyper-up, PyJWT, cryptography). Package is aging—last release 455 days ago—with minimal repository activity (1 star, last commit 2025-05-16). Maintenance status suggests limited ongoing support.
License in practice
MIT license is permissive and imposes no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
from apns2.client import APNsClient
from apns2.payload import Payload
payload = Payload(alert="Hello World!", sound="default", badge=1)
client = APNsClient('key.pem', use_sandbox=False)
client.send_notification(token_hex, payload, topic='com.example.App')
Requires a valid Apple APNs certificate (key.pem) or token credentials with auth_key_id and team_id from Apple Developer account.
Verify before relying
- Whether hyper-up is a maintained fork or a stale dependency; standard hyper status unknown.
- Compatibility with current Apple APNs API changes or deprecations since last release.
- Whether token-based auth implementation matches current Apple requirements.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | 3 — hyper-up, PyJWT, cryptography |
| Maintenance | aging — 455 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 103,695/month — #12,791 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: apns2_up-0.9.0.tar.gz
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
aioapnsaioapns sends push notifications to iOS devices…
permissive · top 5,000 on PyPI
exponent-server-sdkSends push notifications to Expo mobile apps…
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
django-push-notificationsA Django app that manages device registrations…
permissive · top 15,000 on PyPI
pypushdeerA Python SDK for sending push notifications…
permissive · top 15,000 on PyPI
appriseApprise sends notifications to dozens of…
permissive · top 5,000 on PyPI
pushover-completeA Python client library for the Pushover…
permissive · top 15,000 on PyPI
pyobjc-framework-PushKitProvides Python bindings to Apple's PushKit…
permissive · top 15,000 on PyPI
plyerPlyer provides a platform-independent Python…
permissive · top 15,000 on PyPI