{ "info": { "author": "Rakan Alhneiti", "author_email": "rakan.alhneiti@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "django-pushy\n============\nYour push notifications handled at scale.\n\n.. image:: https://travis-ci.org/rakanalh/django-pushy.svg?branch=master\n :target: https://travis-ci.org/rakanalh/django-pushy\n.. image:: https://coveralls.io/repos/rakanalh/django-pushy/badge.png?branch=master\n :target: https://coveralls.io/r/rakanalh/django-pushy?branch=master\n.. image:: https://landscape.io/github/rakanalh/django-pushy/master/landscape.svg?style=flat\n :target: https://landscape.io/github/rakanalh/django-pushy/master\n :alt: Code Health\n\nWhat does it do?\n----------------\nPython / Django app that provides push notifications functionality with celery. The main purpose of this app is to help you send push notifications to your users at scale. If you have lots of registered device keys, django-pushy will split your keys into smaller groups which run in parallel making the process of sending notifications faster.\n\nSetup\n-----\nYou can install the library directly from pypi using pip::\n\n $ pip install django-pushy\n\n\nAdd django-pushy to your INSTALLED_APPS::\n\n INSTALLED_APPS = (\n ...\n \"djcelery\",\n \"pushy\"\n )\n\nConfigurations::\n\n # Android\n PUSHY_GCM_API_KEY = 'YOUR_API_KEY_HERE'\n\n # Send JSON or plaintext payload to GCM server (default is JSON)\n PUSHY_GCM_JSON_PAYLOAD = True\n\n # iOS\n PUSHY_APNS_SANDBOX = True or False\n PUSHY_APNS_CERTIFICATE_FILE = 'PATH_TO_CERTIFICATE_FILE'\n\n PUSHY_QUEUE_DEFAULT_NAME = 'default'\n PUSHY_DEVICE_KEY_LIMIT = 1000\n\n\nRun DB migrations::\n\n python manage.py migrate\n\nHow do i use it?\n----------------\n\nThere are 2 models provided by Pushy:\n1) PushNotification\n2) Device\n\nYou have to implement your own code to use the Device model to register keys into the database::\n\n from pushy.models import Device\n Device.objects.create(key='123', type=Device.DEVICE_TYPE_ANDROID, user=current_user)\n Device.objects.create(key='123', type=Device.DEVICE_TYPE_IOS, user=None)\n\n\nWhenever you need to push a notification, use the following code::\n\n from pushy.utils import send_push_notification\n send_push_notification('Push_Notification_Title', {'key': 'value' ...})\n\nThis will send a push notification to all registered devices.\nYou can also send a single notification to a single device::\n\n device = Device.objects.get(pk=1)\n send_push_notification('YOUR TITLE', {YOUR_PAYLOAD}, device=device)\n\n\nOr you can use the filter_user or filter_type to make pushy send to a specified queryset of devices::\n\n send_push_notification('YOUR TITLE', {YOUR_PAYLOAD}, filter_user=user)\n send_push_notification('YOUR TITLE', {YOUR_PAYLOAD}, filter_type=Device.DEVICE_TYPE_IOS)\n\nIf you don't want to store the push notification into the database, you could pass in a keyword argument::\n\n send_push_notification('YOUR_TITLE', {YOUR_PAYLOAD}, device=device, store=False)\n\nIf you would like to add a push notification without triggering any action right away, you should be setting the property \"payload\ninstead of adding your dict to body as follows::\n\n notification = PushNotification.objects.create(\n title=title,\n payload=payload,\n active=PushNotification.PUSH_ACTIVE,\n sent=PushNotification.PUSH_NOT_SENT\n )\n\nAs some serialization takes place to automatically convert the payload to a JSON string to be stored into the database.\n\n**iOS Users Note:**\nPlease note that iOS special parameters: alert, sound, badge, content-available are all preset for you to None/False. Django-pushy ads payload you provide to the custom payload field.\n\n\nRestful APIs\n------------\n\nTo use Restful APIs, pushy requires DRF >= 3.0.::\n\n pip install django-pushy[apis]\n\n\nAnd add the following to your urls.py::\n\n from pushy.contrib.rest_api import urls as pushy_rest_urls\n\n urlpatterns += [\n url(r'^api/', include(rest_urls))\n ]\n\nAt this point you'll be able to make POST & DELETE requests to /api/pushy/device. An example request (using [httpie](https://github.com/jkbrzt/httpie) tool) to create a key is::\n\n http http:///api/pushy/device/ key= type=ios --json\n\nTo delete a key::\n\n http delete http:///api/pushy/device/ key= --json\n\nAdmin\n-----\nDjango-pushy also provides an admin interface to it's models so that you can add a push notification from admin.\n\nFor that to work, you need to add \"check_pending_push_notifications\" task into your periodic tasks in celery admin. Make sure you setup::\n\n djcelery.setup_loader()\n CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler'\n\n\nAnd don't forget to run celerybeat.\n\nRunning the tests\n-----------------\nInstall mock::\n\n pip install mock\n\nthen run the following from the project's root::\n\n py.test .\n\n\nLicense\n-------\n\nMIT\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rakanalh/django-pushy", "keywords": "", "license": "LICENSE.txt", "maintainer": "", "maintainer_email": "", "name": "Django-Pushy", "package_url": "https://pypi.org/project/Django-Pushy/", "platform": "", "project_url": "https://pypi.org/project/Django-Pushy/", "project_urls": { "Homepage": "https://github.com/rakanalh/django-pushy" }, "release_url": "https://pypi.org/project/Django-Pushy/1.0.2/", "requires_dist": null, "requires_python": "", "summary": "Handle push notifications at scale.", "version": "1.0.2" }, "last_serial": 3246410, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7e977836e114e8a969493bcd21a7ed12", "sha256": "ddd1fe5289c83fa82923064514fe814dd57e283532326fe6673836383dd81704" }, "downloads": -1, "filename": "Django-Pushy-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7e977836e114e8a969493bcd21a7ed12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3239, "upload_time": "2014-10-09T12:26:17", "url": "https://files.pythonhosted.org/packages/33/ab/dd3337c8a01536fed6d1447b0c72737c8fc6289e70dc7cea147fef158ece/Django-Pushy-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "b0f64fc2fa5bcbff1746a3c70d7b5702", "sha256": "e030cde7ba07accf2e633b76c6ff330194e5f2325318f11441d943f847302b27" }, "downloads": -1, "filename": "Django-Pushy-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b0f64fc2fa5bcbff1746a3c70d7b5702", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3420, "upload_time": "2014-10-10T17:40:01", "url": "https://files.pythonhosted.org/packages/65/94/c2f0e3c43f3dc90d8766e9b81cf7db1097ac694a3ea49e8e6efc12893ec7/Django-Pushy-0.1.1.tar.gz" } ], "0.1.10": [ { "comment_text": "", "digests": { "md5": "9164234c58569fffbaba47609cab1b3c", "sha256": "c8cca7bbdf1f9239452921dad9fe965a77d32064b1f37e252ffb542fb7a1114f" }, "downloads": -1, "filename": "Django-Pushy-0.1.10.tar.gz", "has_sig": false, "md5_digest": "9164234c58569fffbaba47609cab1b3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15951, "upload_time": "2016-02-23T19:14:03", "url": "https://files.pythonhosted.org/packages/c5/64/32a98067e3e103dd08b7a6ff0edfb6dfcaf5c959f6ac9306bedf53299acc/Django-Pushy-0.1.10.tar.gz" } ], "0.1.11": [ { "comment_text": "", "digests": { "md5": "ac412580af4b8da2e3bbf3e6e6924988", "sha256": "41464c1a62a97ddf69be3d8d2197c79a31296da1bb59c0278cd53e59b6797fdc" }, "downloads": -1, "filename": "Django-Pushy-0.1.11.tar.gz", "has_sig": false, "md5_digest": "ac412580af4b8da2e3bbf3e6e6924988", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16049, "upload_time": "2016-03-01T12:04:59", "url": "https://files.pythonhosted.org/packages/6d/4d/f1d4507290de825b7a0967afdfc4535e62386da0a2d6606fca9cd816d6bc/Django-Pushy-0.1.11.tar.gz" } ], "0.1.12": [ { "comment_text": "", "digests": { "md5": "ef39d56f105f52635bfc2112c8f71def", "sha256": "aebfb85d53953792118921f7088f6eaf080a9dc30bc5a2f4af9db8f80589cbcb" }, "downloads": -1, "filename": "Django-Pushy-0.1.12.tar.gz", "has_sig": false, "md5_digest": "ef39d56f105f52635bfc2112c8f71def", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14148, "upload_time": "2016-11-19T19:03:18", "url": "https://files.pythonhosted.org/packages/7c/ba/1cb59ed2015b777a463902f842ecc68a7cebb10af773dc731573a19d241d/Django-Pushy-0.1.12.tar.gz" } ], "0.1.13": [ { "comment_text": "", "digests": { "md5": "5123d9bcbd25d3d4665190e173585c5c", "sha256": "5f2fe7a032162d24feaa76e5117711fdcb8ee6dd0376d993b4956ff1b2c7a2ba" }, "downloads": -1, "filename": "Django-Pushy-0.1.13.tar.gz", "has_sig": false, "md5_digest": "5123d9bcbd25d3d4665190e173585c5c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14178, "upload_time": "2017-01-05T10:42:03", "url": "https://files.pythonhosted.org/packages/c2/ee/0fcedd020135befb464408de4089191c1a4ce009c7448ba0723d719ff7c0/Django-Pushy-0.1.13.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f0987dbc4d52f2e28b5517016e31ccc7", "sha256": "2df7eaeb0a6273d3c3f87065c0ed72f97fcf55d10582a624a82bc64449dd9d9e" }, "downloads": -1, "filename": "Django-Pushy-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f0987dbc4d52f2e28b5517016e31ccc7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5551, "upload_time": "2014-10-10T23:23:25", "url": "https://files.pythonhosted.org/packages/2f/de/d04cc4677bbbcb3eaa3a6f6448523a8a207fca722c1323b6ddfccddf6a3f/Django-Pushy-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "2b55e9882c22e31f9e82b08651453fec", "sha256": "a54d567c7112aa285967bd81069d40ddb7cbd8e99e01af944b57b85a35cd6285" }, "downloads": -1, "filename": "Django-Pushy-0.1.3.tar.gz", "has_sig": false, "md5_digest": "2b55e9882c22e31f9e82b08651453fec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7480, "upload_time": "2014-10-11T22:18:10", "url": "https://files.pythonhosted.org/packages/81/39/702ef6e3bf499e269790a48715fb1bb8d2a681b826c00b21d320009183d8/Django-Pushy-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "53e110f8e6fee64e051313cee4546647", "sha256": "815f861d3e6ad14701f8c65a76bb3cc487d681c3adc4bee0129857e9c38dfb77" }, "downloads": -1, "filename": "Django-Pushy-0.1.4.tar.gz", "has_sig": false, "md5_digest": "53e110f8e6fee64e051313cee4546647", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6887, "upload_time": "2014-10-21T20:18:36", "url": "https://files.pythonhosted.org/packages/b6/a8/044e439884d9d7e934445932195f62096a1dd1d96c8a7db68dfebadd7ec3/Django-Pushy-0.1.4.tar.gz" } ], "0.1.5": [], "0.1.6": [ { "comment_text": "", "digests": { "md5": "21996dfeee076c1e885931bbf384aa88", "sha256": "c85bf6ec7d2030d66057a12eaf053450a625b351cbe320f8602bf6f0c460ac20" }, "downloads": -1, "filename": "Django-Pushy-0.1.6.tar.gz", "has_sig": false, "md5_digest": "21996dfeee076c1e885931bbf384aa88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9330, "upload_time": "2015-04-22T18:58:56", "url": "https://files.pythonhosted.org/packages/70/c7/be32f5fe6372c9f65d72dbda11e25061b26b870f3f295300fbd5df5b9d21/Django-Pushy-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "d0f26e1cdd5ca0e50e03be2e52cb0327", "sha256": "dbea3ee1e7e3e61687d6d3b3693055dea3f82cb874094c77e2ddd6a4cf52be3b" }, "downloads": -1, "filename": "Django-Pushy-0.1.7.tar.gz", "has_sig": false, "md5_digest": "d0f26e1cdd5ca0e50e03be2e52cb0327", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9506, "upload_time": "2015-05-04T22:12:10", "url": "https://files.pythonhosted.org/packages/a6/4c/c39607127ddcc010f4451f8d34182e78eda13b9f4823ae7efbb4e85045a4/Django-Pushy-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "c2332c64161165252f21a93018ce9c68", "sha256": "7f0f79d437c1bced77a7c0c6ee97f82dac9b279d171c7e50e8e361aff38a937d" }, "downloads": -1, "filename": "Django-Pushy-0.1.8.tar.gz", "has_sig": false, "md5_digest": "c2332c64161165252f21a93018ce9c68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9675, "upload_time": "2015-05-27T15:32:52", "url": "https://files.pythonhosted.org/packages/e8/38/f75913956230df58055f3e98c20f6fa97d0c94d0261eade1c8a536da9f67/Django-Pushy-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "724b069fc960ae47178de6eb842e80e4", "sha256": "162f933d06e293154fdab3308b593943fdf8c35246bc57fe8cc65ba0071ae453" }, "downloads": -1, "filename": "Django-Pushy-0.1.9.tar.gz", "has_sig": false, "md5_digest": "724b069fc960ae47178de6eb842e80e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10398, "upload_time": "2015-10-06T12:53:54", "url": "https://files.pythonhosted.org/packages/95/1b/cde80a3a1f21869d44b3752871efa347008ab2aa5a065c201e39bc40e18c/Django-Pushy-0.1.9.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "1647d1a9dbba325fb8123d48f1a916c5", "sha256": "3087cc0a7308d4ef7fbf959f902036556c2055052423d0b8cb5eae1434e44daf" }, "downloads": -1, "filename": "Django-Pushy-1.0.0.tar.gz", "has_sig": false, "md5_digest": "1647d1a9dbba325fb8123d48f1a916c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14240, "upload_time": "2017-08-06T19:22:28", "url": "https://files.pythonhosted.org/packages/cf/df/72197ce07316484fd641a16c59e3f9a6367ed770d109d5e5ea45737ab603/Django-Pushy-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "f7523d4c5c13cb3054e188239c13b232", "sha256": "f33028a82dc2ed18ccc8ed4173427580fe77dd685e5ffda3158a2da2ccdc3acd" }, "downloads": -1, "filename": "Django-Pushy-1.0.1.tar.gz", "has_sig": false, "md5_digest": "f7523d4c5c13cb3054e188239c13b232", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14362, "upload_time": "2017-10-04T05:35:57", "url": "https://files.pythonhosted.org/packages/70/24/a6ecc81e91fbdc8d29cac494d4fcb65d4293b6e2bae162c2f22d0e0a417f/Django-Pushy-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "2f74bb8a7d5cac280ed4f447c2b4a0db", "sha256": "5b2a9fe114abd846b48a18ea144c6403d5e0fd3d069aa2431e2e967760f56a07" }, "downloads": -1, "filename": "Django-Pushy-1.0.2.tar.gz", "has_sig": false, "md5_digest": "2f74bb8a7d5cac280ed4f447c2b4a0db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14363, "upload_time": "2017-10-12T22:09:49", "url": "https://files.pythonhosted.org/packages/ac/6b/57ccd924fcc0ccf68d13c50e33a897be58619c70c3f46fdbd947f2eda5fc/Django-Pushy-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2f74bb8a7d5cac280ed4f447c2b4a0db", "sha256": "5b2a9fe114abd846b48a18ea144c6403d5e0fd3d069aa2431e2e967760f56a07" }, "downloads": -1, "filename": "Django-Pushy-1.0.2.tar.gz", "has_sig": false, "md5_digest": "2f74bb8a7d5cac280ed4f447c2b4a0db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14363, "upload_time": "2017-10-12T22:09:49", "url": "https://files.pythonhosted.org/packages/ac/6b/57ccd924fcc0ccf68d13c50e33a897be58619c70c3f46fdbd947f2eda5fc/Django-Pushy-1.0.2.tar.gz" } ] }