This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A simple Apple push notification service provider

Project Description
apush
=====

### A simple Apple push notification service provider in Python.

Important: `Service` overrides `identifier` attribute of `Notification` object.
Instead, errors include token.


```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, use `queue` and `flush`.
```python
for n in notifications:
service.queue(n)

service.flush()
```

Check for errors after sending notifications.
```python
def remove(token):
'''Remove token from database.'''
...

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

Check feedback service for invalid tokens.
```python
for (timestamp, token) in service.feedbacks:
remove(token)
```
Release History

Release History

This version
History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

History Node

0.1.0

History Node

0.0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
apush-0.2.3.tar.gz (4.4 kB) Copy SHA256 Checksum SHA256 Source Nov 16, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting