{"id":16314515,"url":"https://github.com/theskumar/dj-apns","last_synced_at":"2025-04-27T22:50:30.075Z","repository":{"id":66040041,"uuid":"52345265","full_name":"theskumar/dj-apns","owner":"theskumar","description":"Apple Push Notifications made simple in Django using PyAPNS.","archived":false,"fork":false,"pushed_at":"2016-12-19T09:09:47.000Z","size":4,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-26T21:56:34.151Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://saurabh-kumar.com/dj-apns/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theskumar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-23T08:59:44.000Z","updated_at":"2024-04-24T07:27:14.000Z","dependencies_parsed_at":"2023-09-01T14:01:28.193Z","dependency_job_id":null,"html_url":"https://github.com/theskumar/dj-apns","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theskumar%2Fdj-apns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theskumar%2Fdj-apns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theskumar%2Fdj-apns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theskumar%2Fdj-apns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theskumar","download_url":"https://codeload.github.com/theskumar/dj-apns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251057957,"owners_count":21529643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T21:54:06.893Z","updated_at":"2025-04-26T21:56:40.012Z","avatar_url":"https://github.com/theskumar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"DJAPNS (Push Notifications for Django)\n======================================\n\nA minimal Django app can be used to send [apns] push notification that implements Device models that can send messages through [APNS].\n\n\n[APNS]: https://developer.apple.com/go/?id=push-notifications\n\n## Setup\n\nDownload and copy the `djapns` folder to your project or any of your PYTHON_PATH.\n\nEdit your settings.py file:\n\n```\nINSTALLED_APPS = (\n        ...\n        \"djapns\",\n)\n```\n\n### Settings list\nAll settings are contained in a `DJAPNS` dict.\n\n- `ENABLE_ADMIN` (default=True) - Whether to enable Admin interface of not.\n- `ENABLED` (default=True) - Do not send push notifications, but only logs the messages to console useful for testing purposes.\n\n- `USE_SANDBOX` (default=True)\n- `CERT_SANDBOX_FILE` (default=None)\n- `CERT_PRODUCTION_FILE` (default=None)\n\n# Flow\n\n- Attach a device to user a (or `anonymous` user). A user can have multiple devices attached to at the same time.\n- Now select the user(s) you want to send notification to via normal django queryset.\n- Use djapns functions to either send a single notification or notification in bulk.\n- When a user logs out the app, call the `deregister_ios_device` function to disassociate a user from his/her device.\n\n\n## Sending messages\n\n```\nimport djapns\n\ndjapns.send_push_notification(user, ...)\n```\n\n## Sending bulk messages\n\n```\nimport djapns\n\ndjapns.send_bulk_push_notification(users, ...)\n```\n\n\n## Administration\n\nAPNS devices which are not receiving push notifications can be set to inactive by two methods. The web admin interface for APNS devices has a \"prune devices\" option. Any selected devices which are not receiving notifications will be set to inactive [1]. There is also a management command to prune all devices failing to receive notifications:\n\n    $ python manage.py prune_devices\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheskumar%2Fdj-apns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheskumar%2Fdj-apns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheskumar%2Fdj-apns/lists"}