In this post of Python django with Google Firebase series I will show you how to setup and configure Firebase cloud messaging on Python Django.


If we want to send a push-notification to an android app then one the best way is to use Firebase cloud messaging, we can setup a manual push-notification to Android app using Firebase console but sending a automated push-notification sometimes becomes a vary cramp-breaking task. Here, we’ll integrate automated push-notification on python django based “Employee Daily Progress Reporting Web App“. 

Work Flow Intro :

From, last 7 posts, we are working on a Python Django based web-app in which we are using Firebase as a Back-end support, we have created post/video tutorials for each Firebase functionality, integrated in our Web-App. If we talk about current status, till now we have come a very long way as we integrated following functionalities in our web app :

  • Firebase Authentication : SignIn, SignUp, Logout, Session 
  • Firebase Database : Push Data/ Retrieve Data | Secure Database Rules
  • Firebase Storage : Store Image/Files | Retrieve Images/Files

Now, with these functionalities Employee can create a report and Retrieve created reports along with images, but there is a requirement of sending automated push-notification to admin android app once a report is created. So, i hope you guys are clear with requirement of Integrating FCM with my Python Django web app. Let’s see a step by step guide :-   

If you like videos like this consider donating $1, or simply turn off AdBlocker. Either helps me to continue making tutorials.

Code below follows the video to help :

Transcript / Cheat Sheet

Setting Up Firebase Console for FCM : 

Setting Up Pusher Beams (Pusher Notifications) : 

Django Code :

def push_notify(name,progress,work):
from pusher_push_notifications import PushNotifications
pn_client = PushNotifications(
response = pn_client.publish(
publish_body={'apns': {'aps': {'alert': 'Report Created'}},
'fcm': {'notification': {'title': str(name), 'body': 'Progress: '+str(progress) +" work: " +str(work) }}}

Android Code :


compile com.pusher:push-notifications-android:0.9.12 compile

Main :

import com.pusher.pushnotifications.PushNotifications;

PushNotifications.start(getApplicationContext(), "61d2753d-9e78-4bc5-86d4-61e44fedab27");


Get whole project source code here.