Skip to main content

Django app which stores, manages FCM push tokens and interacts with them.

Project description


Django app which stores, manages FCM push tokens and interacts with them.


djangoFCM is Django-compatible application which stores FCM push tokens, their parameters, and automates push notifications routines.

Main feature is for djangoFCM to be a "plug-in" Django application, thus capable to work with "little-to-no" configuring and changes to Django project.


djangoFCM @ v0.1.0 can:

  • store push tokens
  • store push tokens` arbitrary parameters with types:
    • foreign key
  • store push notifications
  • send scheduled push notifications
  • compose recipients for push notifications based on user-specified conditions

Usage example



sample-project is a showcase django project. You can reference to it for usage cases, examples, testing. You must never deploy sample_project in production due to exposed SECRET_KEY.

Getting Started


System dependencies

In means of automatisation, djangoFCM heavily relies on celery (via django-celery-beat), thus it is your task to provide celery and celerybeat processes and message broker (e.g. rabbitMQ).

Python packages

  • django~=3.2.8 might work on lesser versions, not tested
  • django-celery-beat~=2.2.1 might work on lesser versions, not tested
  • pyfcm~=1.5.4 might work on lesser versions, not tested

Django applications

  • django_celery_beat


Using Python Package Index

  • make sure to use latest pip:

    python3 -m pip install --upgrade pip
  • install djangoFCM:

    python3 -m pip install djangoFCM

OR download package from releases

  • download release asset (.tar.gz or .whl)

  • make sure to use latest pip:

    python3 -m pip install --upgrade pip
  • install djangoFCM from file:

    python3 -m pip install /path/to/downloaded/asset.tar.gz # or .whl

OR clone from repository

  • clone project:

    git clone \
            --depth=1 \
            --branch=master \
  • move /djangoFCM/djangoFCM solely to folder containing django apps

    mv      </path/to/downloads>/djangoFCM/djangoFCM \
  • remove leftovers

    rm -rf  </path/to/downloads>/djangoFCM


Installing application

Add djangoFCM to INSTALLED_APPS in your Django project

If you installed package the third way, </path/to/django/project/apps> must be added to PYTHONPATH. If you not sure add code below in your Django project before calling main():


Provide FCM api key via DJANGOFCM_FCM_API_KEY in your Django project


Make sure to point celery to djangoFCM.tasks.send_push_notification task. Use app.autodiscover_tasks() in your celeryapp module or specify in settings:


Provide Celery worker to execute tasks, e.g:

venv/bin/celery -A sample_project worker -l INFO

Official documentation may help.


Provide Celery beat to start scheduled tasks, e.g:

venv/bin/celery -A sample_project beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler

Official documentation on custom schedulers.


@omelched (Denis Omelchenko)



djangoFCM version history and changelist available at releases page.


This project is licensed under the GNU APGLv3 License - see the LICENSE file for details.


Inspiration, code snippets, etc.

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

djangoFCM-0.2.0.tar.gz (30.2 kB view hashes)

Uploaded source

Built Distribution

djangoFCM-0.2.0-py3-none-any.whl (46.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page