Skip to content

Instantly share code, notes, and snippets.

@ikeikeikeike
Created July 24, 2012 17:08
Show Gist options
  • Save ikeikeikeike/3171238 to your computer and use it in GitHub Desktop.
Save ikeikeikeike/3171238 to your computer and use it in GitHub Desktop.
pyapns sample code
from pyapns import configure, provision, notify
configure({'HOST': 'http://localhost:7077/'})
provision('myapp', open('cert.pem').read(), 'sandbox')
notify('myapp', 'hexlified_token_str', {'aps':{'alert': 'Hello!'}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment