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

🔔 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.6.tar.gz (4.1 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.6-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_push_dispatcher-0.1.6.tar.gz
  • Upload date:
  • Size: 4.1 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.6.tar.gz
Algorithm Hash digest
SHA256 3bc47f66d5983c2558e257b06473116d4c1d4da77760bcd268ef67ec496083d7
MD5 321ac2740b6da53c226081f65fd9da0d
BLAKE2b-256 5587b589db0be3a72b7bdfc65a29a292b6a9e44f2bddb412db3bc311a5a5e2a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_push_dispatcher-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ef7b55b78ead0cd2cf36282aa1f7d95645a38db088f03f59954c42faa150f36d
MD5 346b1684b0719b3ad97edb4ad4c90b47
BLAKE2b-256 cda4ed010c3e2480618c32caeb6d0b38733aca64a964d24ddce9f62a525cee3a

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