Skip to main content

A simple Apple push notification service provider

Project description

apush
=====

A Simple Apple Push Notification Service Provider.

```python
from apush import Service, Notification, ERROR_INVALID_TOKEN

token = 'hex-encoded token'.decode('hex')
service = Service('/path/to/certificate.pem')
notification = Notification(token, alert='A new notification', badge=1)
service.send(notification)

# For several notifications
for n in notifications:
service.queue(n)

service.flush()

# Check errors
for (status, identifier, token) in service.errors:
if status == ERROR_INVALID_TOKEN:
remove(token)


# Check feedback service for invalid tokens
for (timestamp, token) in service.feedbacks:
remove(token)

```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apush-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file apush-0.1.0.tar.gz.

File metadata

  • Download URL: apush-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for apush-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a6364c67a73385aca94622e8e6c2cea2788b017ef304d41f3cc3e2a3f53485ad
MD5 d173824772e79701f1c5ef6b26387a85
BLAKE2b-256 b4727864f01a2a80c6b014b662df9ea27ff72c1684a195b387c91e4fafccc137

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page