--- id: aioapns version: "4.0" license: Apache License, Version 2.0 license_treatment: permissive maintenance: aging --- # aioapns — An efficient APNs Client Library for Python/asyncio License: permissive · Maintenance: aging · Downloads: 848.5K/mo ## 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 above — 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 pip install aioapns uv add aioapns poetry add aioapns ## Installing 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='', 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: unspecified - Install friction: low - Maintenance: aging - Downloads: 848.5K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags ios push notifications asyncio, apns client library python, apple push notification service, http2 async ios notifications, apns certificate token auth, asyncio push notification sender, ios device notification delivery, asyncio, ios-notifications, apns [View on SkillFed](https://skillfed.io/packages/aioapns) · [View on PyPI](https://pypi.org/project/aioapns/)