skillfed

pyapns-client

Simple, flexible and fast Apple Push Notifications on iOS, OSX and Safari using the HTTP/2 Push provider API.

pyapns-client v2.0.6 1.0M downloads/30d#4,458 on PyPI24
Permissive license MIT License Abandoned released

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

uv

uv add pyapns-client

poetry

poetry add pyapns-client

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: CommunicationsTopic :: InternetTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

Tags

apple push notifications iosapns http/2 clientios push notification librarytoken-based apnsapple push provider apiios notification sender
push-notificationsapple-apnshttp2

More Python Modules packages