pyapns-client
Simple, flexible and fast Apple Push Notifications on iOS, OSX and Safari using the HTTP/2 Push provider API.
What it is and what it does
pyapns_client is a Python wrapper around Apple's HTTP/2 Push Notification service (APNs) that handles the complexity of token-based authentication and notification delivery. It manages persistent connections, error handling, and automatic retries for failed pushes, letting you send notifications to iOS, macOS, and Safari apps by providing device tokens, a notification payload, and your Apple credentials.
The package depends on httpx for HTTP/2 communication, PyJWT and cryptography for token signing, and pytz for timezone handling. It supports iOS 10+ features like collapse IDs, subtitles, and mutable notifications. However, the project is no longer maintained—the last release was in June 2022 and the repository shows no activity since April 2023, so it may not reflect current Apple APNs requirements or security practices.
Use it for:
- Send push notifications to iOS apps from a Python backend service using token-based authentication instead of certificate renewal.
- Implement device unregistration handling by catching UnregisteredException to clean up stale device tokens from your database.
- Build a notification system that retries failed pushes automatically and distinguishes between device errors, server errors, and programming mistakes.
- Deliver rich notifications with titles, subtitles, and mutable content to iOS 10+ devices from a Python application.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Sends Apple Push Notifications to iOS, macOS, and Safari devices via Apple's HTTP/2 APNs API using token-based authentication.
Yes, if you have a stable Python 3.6+ environment and your Apple APNs credentials are already set up—the package is simple and has no known vulnerabilities. No, if you need active maintenance, security updates, or compatibility with future Apple APNs changes; consider alternatives that are actively maintained. The abandoned status and lack of recent commits mean you should verify compatibility with your current Apple Developer setup before committing to it.
Install
pyapns-client on PyPI
pip
pip install pyapns-clientuv
uv add pyapns-clientpoetry
poetry add pyapns-clientInstalling pyapns-client
Before you install
Low install friction with a pure-Python wheel distribution. However, the package is abandoned—last release was 2022-06-09 and last commit 2023-04-20, with no recent maintenance. Use only if your dependencies and Python version remain stable.
License in practice
MIT License permits commercial and private use with minimal restrictions, requiring only attribution and inclusion of the license text.
Quickstart
pip install pyapns_client
from pyapns_client import APNSClient, IOSPayload, IOSNotification
client = APNSClient(
mode=APNSClient.MODE_DEV,
root_cert_path='/path/to/root_cert.pem',
auth_key_path='/path/to/auth_key.p8',
auth_key_id='AUTHKEY123',
team_id='TEAMID1234'
)
notification = IOSNotification(payload=IOSPayload(), topic='com.example.app')
client.push(notification=notification, device_token='device_token')
client.close()
Requires an Apple Developer account with APNs credentials (auth key .p8 file, team ID, key ID) and the AAACertificateServices root certificate.
Verify before relying
- Whether the package remains compatible with current Apple APNs API changes or certificate requirements since its last update in 2023.
- Current state of httpx, PyJWT, and cryptography dependency versions and any breaking changes affecting this package.
Package facts
| License | MIT License (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — httpx, PyJWT, cryptography, pytz |
| Maintenance | abandoned — 1,527 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,038,784/month — #4,458 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyapns_client-2.0.6-py3-none-any.whl
Keywords: apns, apple, ios, osx, safari, push, notifications
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
aioapnsaioapns sends push notifications to iOS devices…
permissive · top 5,000 on PyPI
apns2-upSends push notifications to iOS devices through…
permissive · top 15,000 on PyPI
pypushdeerA Python SDK for sending push notifications…
permissive · top 15,000 on PyPI
exponent-server-sdkSends push notifications to Expo mobile apps…
permissive · top 15,000 on PyPI
django-push-notificationsA Django app that manages device registrations…
permissive · top 15,000 on PyPI
urbanairshipPython library for integrating Airship's push…
permissive · top 15,000 on PyPI
pyobjc-framework-PushKitProvides Python bindings to Apple's PushKit…
permissive · top 15,000 on PyPI
wallet-py3kGenerates Apple Wallet (.pkpass) files from…
unclear · top 15,000 on PyPI
pyobjc-framework-UserNotificationsProvides Python bindings to macOS's…
permissive · top 15,000 on PyPI
pyobjc-framework-NotificationCenterProvides Python bindings to macOS's…
permissive · top 15,000 on PyPI