Sends remote push notifications to registered devices. Build for local debug and development. Currently only iOS push notifications supported.
-
get Python (most Unix-like OS' come with python pre-installed)
-
pyapns (Apple push notification handler)
$ pip install pyapns -
twisted (required by pyapns)
$ pip install twisted -
pyOpenSSL (required by pyapns)
$ pip install pyOpenSSL -
[] (strongly recommended by pyOpenSSL)
$ pip install service_identity -
if you need to convert your export of the push certificate and private key to a .pem file use
$ openssl pkcs12 -in certs.p12 -out certs.pem -nodes -
copy the
config.json.examplefile toconfig.jsonand adjust to your settings -
start twistd service; example:
$ twistd -r default web --class=pyapns.server.APNSServer --port=7077 -
run the script; example:
$ ./spring.py -a 'hello spring!' -b 42 -s default -i 'sandbox:my_awesome_app'