django-push-notifications | Send push notifications to mobile devices | Notification library

 by   jazzband Python Version: 3.0.2 License: MIT

kandi X-RAY | django-push-notifications Summary

kandi X-RAY | django-push-notifications Summary

django-push-notifications is a Python library typically used in Messaging, Notification, Firebase applications. django-push-notifications has no vulnerabilities, it has build file available, it has a Permissive License and it has high support. However django-push-notifications has 1 bugs. You can install using 'pip install django-push-notifications' or download it from GitHub, PyPI.

Send push notifications to mobile devices through GCM or APNS in Django.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              django-push-notifications has a highly active ecosystem.
              It has 2095 star(s) with 578 fork(s). There are 66 watchers for this library.
              There were 1 major release(s) in the last 6 months.
              There are 131 open issues and 271 have been closed. On average issues are closed in 182 days. There are 19 open pull requests and 0 closed requests.
              OutlinedDot
              It has a negative sentiment in the developer community.
              The latest version of django-push-notifications is 3.0.2

            kandi-Quality Quality

              django-push-notifications has 1 bugs (0 blocker, 0 critical, 1 major, 0 minor) and 49 code smells.

            kandi-Security Security

              django-push-notifications has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              django-push-notifications code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              django-push-notifications is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              django-push-notifications releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              django-push-notifications saves you 1312 person hours of effort in developing the same functionality from scratch.
              It has 2945 lines of code, 226 functions and 41 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed django-push-notifications and discovered the below as its top functions. This is intended to give you an instant insight into django-push-notifications implemented functionality, and help decide if they suit your requirements.
            • Validate application configuration
            • Validate required settings
            • Validate application settings
            • Validate the APNS certificate
            • Sends a message
            • Yield successive n - sized chunks from l
            • Get the global configuration manager
            • Send a notification request
            • Send a new alert message
            • Validate the GCM configuration
            • Validate FCM configuration
            • Validate WNS configuration
            • Send a message
            • Prepare a value
            • Send a message
            • Determine if the application has authentication credentials
            • Get notification URL
            • Get the maximum number of recipients for a given cloud type
            • Convert the value to a string
            • Convert value to unsigned integer
            • Get FCM API key
            • Get the APNS certificate
            • Create a new instance
            • Send a message to the APNS
            • Get the APNS certificate
            • Sends a message
            Get all kandi verified functions for this library.

            django-push-notifications Key Features

            No Key Features are available at this moment for django-push-notifications.

            django-push-notifications Examples and Code Snippets

            ##Models
            Pythondot img1Lines of Code : 27dot img1License : Permissive (MIT)
            copy iconCopy
            from instapush.models.base import BaseDevice, GCMDevice, APNSDevice
            
            device_id = preferences.get_unique_id()
            reg_id = preferences.get_registration_id()
            user = preferences.get_user()
            
            device = GCMDevice.objects.create(registration_id=reg_id, device_id  
            ##Push Notifications
            Pythondot img2Lines of Code : 22dot img2License : Permissive (MIT)
            copy iconCopy
            from instapush.models.mongo import APNSDevice, GCMDevice
            
            device = GCMDevice.objects.get(owner=request.user)
            device.send_message({"type": "notify", "message": "You've a new notification"})
            
            
            device = APNSDevice.objects.get(owner=request.user)
            device.  
            ##Settings
            Pythondot img3Lines of Code : 9dot img3License : Permissive (MIT)
            copy iconCopy
            INSTAPUSH_SETTINGS = {
                'DEVICE_OWNER_MODEL': 'accounts.models.UserAccount',
                'GCM_SETTINGS': {
                    'API_KEY': 'my gcm api key'
                },
                'APNS_SETTINGS': {
                    'APNS_CERTIFICATE': os.path.join(PROJECT_ROOT, 'keys/apns_sandbox.pem')
                

            Community Discussions

            QUESTION

            Sending iOS Push Notifications using Django: HTTP/2-based APNs provider API and binary protocol
            Asked 2021-Mar-14 at 10:16

            We need to send iOS push notifications using our Django based backend. Currently, we use this library https://github.com/jazzband/django-push-notifications for sending notifications. Recently, received this mail from Apple Developers.

            The HTTP/2‑based Apple Push Notification service (APNs) provider API lets you take advantage of great features, such as authentication with a JSON Web Token, improved error messaging, and per‑notification feedback. If you still send push notifications with the legacy binary protocol, make sure to upgrade to the APNs provider API as soon as possible. APNs will no longer support the legacy binary protocol after March 31, 2021.

            I saw that this library uses apns2 (https://pypi.org/project/apns2/) for sending push notifications on iOS and that uses HTTP/2 protocol for sending notifications. So, this library can continue to be used for sending iOS notifications right? Can anybody clarify that for me? Also, it would be great if someone could explain the meaning of legacy binary protocol, that would be great.

            ...

            ANSWER

            Answered 2021-Mar-14 at 10:16

            After posting the question here, I had also raised Github Issue on Django-Push-Notifications Repository.

            I have got a reply from maintainers and it looks like we would be able to continue using this library. Posting his reply here,

            For what I understand this should not be an issue nor for this package nor for apns2 (which is used to send Apple-Push-Notifications).

            Apple is dismantling the legacy binary protocol (which was announced on October 9 2020) in favor of the HTTP one. However since apns2 implements the latter this would not be an issue here since it already uses the preferred protocol.

            For the record: here is the specification of the legacy binary protocol for APNS.

            https://github.com/jazzband/django-push-notifications/issues/601#issuecomment-793489138

            Source https://stackoverflow.com/questions/66517902

            QUESTION

            App Download from App Store got BadDeviceToken, build from source does not
            Asked 2020-Feb-13 at 04:21

            I have searched over the Stackoverflow, but none of them answer to my questions Build from Xcode APNS works, but App Store version my backend raises BadDeviceToken.

            The Success are registration_id made by build from source

            ...

            ANSWER

            Answered 2020-Feb-10 at 22:30

            QUESTION

            How to implement web client with django-push-notifications?
            Asked 2019-May-20 at 13:04

            I have successfully implement APNS using django-push-notifications. And I have found that this dependency is growing up and has a Web Push Notifications as well. I had tried followed up the given code, but unable to see a registation_id. I got

            ...

            ANSWER

            Answered 2019-May-20 at 13:04

            QUESTION

            SSLError: [Errno 1] _ssl.c:510: error:1409442E:SSL routines:SSL3_READ_BYTES:tlsv1 alert protocol version
            Asked 2019-Mar-14 at 17:48

            django-push-notifications was working with both sandbox and production certificates. But since yesterday it is failing with following errors.

            SSLError: [Errno 1] _ssl.c:510: error:1409442E:SSL routines:SSL3_READ_BYTES:tlsv1 alert protocol version

            No change in our code or our servers. Any ideas, why it has stopped working.

            UPDATE

            OpenSSL 1.0.1f 6 Jan 2014 Ubuntu: 14.04

            I upgraded to OpenSSL 1.1.1a 20 Nov 2018 but same results.

            I also checked TLS version supported by my python using following and got "TLS 1.3".

            python -c "import requests; print(requests.get('https://www.howsmyssl.com/a/check', verify=False).json()['tls_version'])"

            ...

            ANSWER

            Answered 2019-Mar-13 at 19:30

            From a OpenSSL point of view a client SSL Socket connection to a SSL server is failing because none of the SSL/TLS Socket versions supported by the client is enabled (or supported) on the server.

            So my guess is that the server has restricted the protocol versions of SSL/TLS it's supports to the point where your openssl client can't handle it any more. At a guess TLS 1.2 and TLS 1.3 only now. Maybe TLS 1.1.

            Can you update your client OpenSSL version to a later version to see if it fixes the connection issues?

            Also it may help to check (if you can) what protocol versions you are enabling on the client side to make sure all the highest protocol versions are enabled - TLS 1.1, TLS 1.2, TLS1.3 - if you have openssl 1.1.1.

            Source https://stackoverflow.com/questions/55143628

            QUESTION

            Upload APNs certificate to AWS Lambda
            Asked 2019-Mar-08 at 09:07

            I am using Django with Zappa to connect to serverless AWS Lambda. To get APNs (Apple Push Notification services) up and running, I originally had to upload my certificate file to the server, so that my backend can access it whenever it needs to. But now that I migrated to AWS Lambda, I am not sure how to upload the certificate file.

            I use this package django-push-notifications to use APNs and in my Django settings, I have

            PUSH_NOTIFICATIONS_SETTINGS = { "APNS_CERTIFICATE": os.path.join(BASE_DIR, "../../Certificates_and_keys/prod_pushcert.pem"), "APNS_TOPIC": "org.reactjs.native.example.Spap", "UPDATE_ON_DUPLICATE_REG_ID": True, "USER_MODEL": "social.User", }

            Where the value for APNS_CERTIFICATE is the path of the APNs certificate file. Before using AWS Lambda, I had another server where I uploaded the certificate file with ftp. I don't know how to do that with AWS Lambda. Any suggestions?

            ...

            ANSWER

            Answered 2019-Mar-06 at 20:11

            I don't know off the top of my head how long APNs certificates are, but if they're less than 4 KB, then you could add it as a Lambda environment variable and read it into a temporary file on startup (in settings.py).

            If they're larger than 4 KB, you could store the certificate in S3 and then download it to a temporary file on startup:

            Source https://stackoverflow.com/questions/55030817

            QUESTION

            ModuleNotFoundError: No module named 'push_notifications' I am getting this error after I've uninstalled the module django push notification
            Asked 2019-Feb-21 at 06:04

            snap of error is here which I am getting while I am migrate

            First I've installed this package using pip install django-push-notifications after that I've removed this package through pip uninstall django-push-notifications after that when I've tried migrating this. I am getting this error

            ...

            ANSWER

            Answered 2019-Feb-21 at 06:02

            You have uninstalled the module, therefore Django could not find it. Thats why it's giving error.

            If you have uninstalled the module, please remove push_notifications present in INSTALLED_APPS of your settings.py file

            Source https://stackoverflow.com/questions/54800196

            QUESTION

            FirebaseMessagingService #onMessageReceived is not being called
            Asked 2018-Apr-20 at 13:51

            Firebase Server sends notification, I get it, but my MyFirebaseMessagingService's onMessageReceived is not being called.

            This is MyFirebaseMessagingService:

            ...

            ANSWER

            Answered 2018-Apr-20 at 13:51

            The server part of the app was trying to send as Notification Message. This is what was causing the issue, and after I figured this out, I talked with the backend guy, in order to change the code to use Data Message, and now it works

            Source https://stackoverflow.com/questions/49939815

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install django-push-notifications

            You can install using 'pip install django-push-notifications' or download it from GitHub, PyPI.
            You can use django-push-notifications like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install django-push-notifications

          • CLONE
          • HTTPS

            https://github.com/jazzband/django-push-notifications.git

          • CLI

            gh repo clone jazzband/django-push-notifications

          • sshUrl

            git@github.com:jazzband/django-push-notifications.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Reuse Pre-built Kits with django-push-notifications

            Consider Popular Notification Libraries

            push.js

            by Nickersoft

            server

            by gotify

            fsnotify

            by fsnotify

            noty

            by needim

            gorush

            by appleboy

            Try Top Libraries by jazzband

            django-debug-toolbar

            by jazzbandPython

            pip-tools

            by jazzbandPython

            tablib

            by jazzbandPython

            django-silk

            by jazzbandPython