Skip to main content

Minimalistic device registration and push notifications with FCM and Django

Project description

Register devices and send push notifications via FCM from your Django app

Code style: black Codecov CircleCI

django-fcm-devices

django-fcm-devices is a Django app that facilitates the registration of devices' FCM tokens and sending of push notifications to those devices.

The approach taken in this library is different to other libraries, in that it aims to be super simple and well tested.

Installation

pip install django-fcm-devices

Configuration

You need to configure your FCM API key by adding to your settings:

  • DEVICES_FCM_API_KEY your FCM API key.

You can optionally subclass the FCMBackend to add your own behaviour using the following setting and dot notation:

  • DEVICES_FCM_BACKEND_CLASS

Usage

Todo: describe API exposure and behaviour

Todo: show use without API usage

Contribute

django-fcm-devices supports a variety of Python and Django versions. It's best if you test each one of these before committing. Our Circle CI Integration will test these when you push but knowing before you commit prevents from having to do a lot of extra commits to get the build to pass.

Environment Setup

In order to easily test on all these Pythons and run the exact same thing that CI will execute you'll want to setup pyenv and install the Python versions outlined in tox.ini.

If you are on Mac OS X, it's recommended you use brew. After installing brew run:

$ brew install pyenv pyenv-virtualenv pyenv-virtualenvwrapper

Then:

pyenv install -s 3.6.10
pyenv install -s 3.7.6
pyenv install -s 3.8.1
pyenv virtualenv devices 3.8.1
pyenv shell devices 3.6.10 3.7.6
pip install detox

To run the test suite:

$ detox

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-fcm-devices-0.0.1.tar.gz (7.7 kB view hashes)

Uploaded Source

Built Distribution

django_fcm_devices-0.0.1-py3-none-any.whl (10.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page