skillfed

apns2-up

A python library for interacting with the Apple Push Notification Service via HTTP/2 protocol

apns2-up v0.9.0 103.7K downloads/30d#12,791 on PyPI1
Permissive license MIT AGING released

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

uv

uv add apns2-up

poetry

poetry add apns2-up

Installing 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

Development Status :: 4 - BetaLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Software Development :: Libraries

Tags

apple push notifications iosapns http2 clientios push notification librarysend notifications to iphoneapns certificate authenticationtoken based apnsbatch push notifications ios
push-notificationsios-developmenthttp2

More Libraries packages