Skip to main content

Python client for Apple Push Notification service (APNs). Check documentation to learn how to use it.

Check the client with similar interface for Google Cloud Messaging.

Requirements

Standard library has support for SSL transport. However, it is impossible to use it with certificates provided as a string. We store certificates in database, because we handle different apps on many Celery worker machines. A dirty solution would be to create temporary files, but it is insecure and slow. So, we have decided to use a better OpenSSL wrapper and pyOpenSSL was the easiest to handle.

Alternatives

There are many alternatives available. We have started with pyapns and APNSWrapper. This library differs in the following design decisions:

  • Support certificates from strings. We do not distribute certificate files on worker machines, they fetch it from the database when needed. This approach simplifies deployment, upgrades and maintenance.

  • Keep connections persistent. An SSL handshaking round is slow. Once connection is established, it should remain open for at least few minutes, waiting for the next batch.

  • Support enhanced format. Apple developers have designed a notoriously bad push protocol. They have upgraded it to enhanced version, which makes it possible to detect which messages in the batch have failed.

  • Clean pythonic API. No need for lots of classes, long lists of exceptions etc.

  • Do not hard-code validation, let APNs fail. This decision makes library a little bit more future proof.

Support

APNs client was created by Sardar Yumatov, contact me if you find any bugs or need help. Contact Getlogic if you need a full-featured push notification service for all popular platforms. You can view outstanding issues on the APNs Bitbucket page.

Release files for apns-client 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apns-client 0.1.8
File Size Uploaded
apns-client-0.1.8.tar.gz 20.7 kB Details

Release files / apns-client-0.1.8.tar.gz

Download URL apns-client-0.1.8.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9b030d21b604491d779142637a9fe667d80861ed8679b36576e864cc7b4d6fa4
BLAKE2b-256 checksum
How to use checksums
28c8dca8b7d79d83a96b92b3c5ca642ba6e31bad4c417758f80ee5445e3b56bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.2.1

1 release file

0.2

1 release file

This release

0.1.8 This release

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page