Skip to main content

No project description provided

Reason this release was yanked:

This release contains a packaging or configuration issue that may affect installation or functionality. A corrected version will be published shortly.

Project description

Glad you liked the setup! Here's a polished and super-readable version of your README.md section with clean formatting, ideal for both new users and experienced devs:


🔔 Push Dispatcher

Push Dispatcher is a simple and reusable service for sending push notifications using Firebase Cloud Messaging (FCM) in Django projects.

Send targeted messages to device tokens or broadcast to topics — with built-in support for Android and iOS.


🚀 Features

  • 🔹 Send push notifications to device tokens
  • 🔹 Broadcast messages to topics
  • 🔹 Subscribe/unsubscribe devices from topics
  • 🔹 Supports APNs (iOS) and message priority
  • 🔹 Uses Firebase service account for secure messaging

⚙️ Quick Setup

1. Install Dependencies

pip install firebase-admin requests

2. Firebase Setup

  • Go to the Firebase Console
  • Create a project (if you haven’t already)
  • Navigate to Project Settings > Service Accounts
  • Click "Generate new private key"
  • Save the downloaded .json file to your Django project

3. Add to settings.py

# settings.py

INSTALLED_APPS = [
    ...
    "push_dispatcher",
]

FCM_PROJECT_ID = "your-firebase-project-id"
FIREBASE_SERVICE_ACCOUNT_KEY_PATH = "path/to/serviceAccountKey.json"

4. Send Notifications

from push_dispatcher.notifications import PushNotificationDispatcher

dispatcher = PushNotificationDispatcher()

# Send to device tokens
dispatcher.send_to_tokens(
    tokens=["device_token_1", "device_token_2"],
    title="Hello",
    body="This is a test notification",
    custom_key="value"  # Optional additional data
)

# Send to a topic
dispatcher.send_to_topic(
    topic="news-updates",
    title="Breaking News",
    body="Check out the latest story!"
)

Let me know if you want to add error handling, response examples, or Django integration tips too!

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_push_dispatcher-0.1.5.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_push_dispatcher-0.1.5-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file django_push_dispatcher-0.1.5.tar.gz.

File metadata

  • Download URL: django_push_dispatcher-0.1.5.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for django_push_dispatcher-0.1.5.tar.gz
Algorithm Hash digest
SHA256 91214c59d8de15796cd753dff03aee05574d1b443a22586a034ed9299e6d7718
MD5 6839161206ee8de0601092a262d4150e
BLAKE2b-256 ce805304547d60f83d10297921c7e8eea525bf2f0654015a3477d541754e40c7

See more details on using hashes here.

File details

Details for the file django_push_dispatcher-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for django_push_dispatcher-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 63916c4206a3bc13cac44cd38f1997bef0ce21690535ca8bf2a7b7053fe61892
MD5 c308ac542aa1d7a53d7c3b8e6fc8910a
BLAKE2b-256 8b66d7fc19ac191f36c1cce8ca9e2b270f6a0a0c7c8708853e958c2a9f2e6c9e

See more details on using hashes here.

Supported by

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