finds.dev← search

// the find

xtrinch/fcm-django

★ 794 · Python · MIT · updated Apr 2026

FCM Django: Send push notifications via django to websites, iOS & android mobile devices through FCM (Firebase Cloud Messaging)

fcm-django wraps Firebase Admin SDK to give Django projects a managed FCMDevice model with migrations, DRF viewsets, and queryset-level bulk send. It handles the bookkeeping work — token pruning, device deactivation, one-device-per-user enforcement — so you don't have to bolt that onto your own model. Aimed at any Django shop that needs push to iOS, Android, or web without building the plumbing from scratch.

The queryset API (FCMDevice.objects.filter(...).send_message()) is the right abstraction — it composes naturally with Django ORM and maps to Firebase batch sends under the hood. The FirebaseResponseDict wrapper surfacing per-device failure details (failed_registration_ids, failed_exceptions) is genuinely useful; Firebase's batch API silently succeeds at the HTTP level while failing per-token. The device_deactivated signal with structured reason and source fields gives you a real hook for auditing without monkey-patching. Async queryset methods (asend_message, asend_bulk_personalized_messages) using firebase-admin's native send_each_async are a thoughtful addition rather than just running sync in a thread pool.

send_bulk_personalized_messages interpolates templates client-side using string formatting, which means you're doing N message constructions in Python before handing off to Firebase — there's no batching optimization there for large recipient lists. The DRF viewsets don't expose any rate-limiting or throttle hooks, so nothing stops a client from registering thousands of tokens per user. Topic subscription (handle_topic_subscription) goes through Firebase's per-device subscribe API one token at a time under the hood, which will hammer your quota for large device sets. The library is essentially a thin wrapper, so if firebase-admin changes its error taxonomy again (it has before), your exception handling breaks silently — there's no abstraction layer insulating you from upstream churn.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →