Skip to main content

Persistent notification center with topbar bell, event bus integration, and optional Web Push

Project description

fastpluggy-notification-center

Notification Center Release Pipeline Status Coverage

Persistent notification center for FastPluggy with topbar bell icon, event bus integration, pluggable delivery channels, and optional Web Push support.

Installation

pip install fastpluggy-notification-center

For Web Push support:

pip install fastpluggy-notification-center[push]

Features

  • Topbar bell icon — unread badge count, slide-out notification panel
  • Event bus integration — listens to all notification.* events automatically
  • Pluggable channels — any plugin can register as a delivery channel via the NotificationChannel protocol
  • Channel relay — forward notifications to external channels (ntfy, email, etc.) based on category
  • Web Push — browser push notifications via VAPID (auto-generates keys on first load)
  • Notification categoriesinfo, success, warning, error with colored badges
  • Read/unread tracking — mark individual or bulk mark-as-read
  • Auto-cleanup — configurable retention period (default 30 days)

Configuration

Settings are managed via NotificationCenterSettings (database-backed). Configure through the FastPluggy settings UI.

Setting Default Description
notification_retention_days 30 Days to keep notifications before cleanup
max_notifications_per_page 50 Pagination size for notification list
relay_enabled false Enable forwarding to delivery channels
relay_channels [] Channel names to relay to (empty = all discovered)
relay_categories ["error"] Only relay notifications with these categories
web_push_enabled true Enable browser Web Push support
vapid_private_key "" VAPID private key (auto-generated if empty)
vapid_public_key "" VAPID public key (auto-generated if empty)
vapid_contact_email "" Contact email for VAPID identification

Usage

Sending notifications via event bus

Any plugin can emit a notification event:

fast_pluggy.events.emit("notification.info", payload={
    "title": "Task completed",
    "message": "Backup finished successfully",
    "category": "success",
    "data": {"task_id": 42},
})

Sending browser push notifications

fast_pluggy.events.emit("notification.push", payload={
    "title": "Deployment ready",
    "message": "v1.2.0 is live",
    "url": "/plugin/ecosystem_status/",
})

Explicit relay to all channels

Bypasses the category filter:

fast_pluggy.events.emit("notification.relay", payload={
    "title": "Critical alert",
    "message": "Database connection lost",
    "category": "error",
})

Registering a delivery channel

Any plugin can act as a delivery channel by implementing the NotificationChannel protocol:

from fastpluggy_plugin.notification_center.channels import NotificationChannel

class MyChannel:
    channel_name = "my_channel"

    def send(self, title, message, category, data=None):
        # deliver the notification
        ...

class MyPlugin(FastPluggyBaseModule):
    notification_channel = MyChannel()

The notification center discovers channels automatically at startup.

Dashboard

The notification panel is accessible via the topbar bell icon on every page. A full notification history page is available at /plugin/notification_center/ (CI) or /plugin-pkg/notification_center/ (local dev).

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

fastpluggy_notification_center-0.2.0.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

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

fastpluggy_notification_center-0.2.0-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file fastpluggy_notification_center-0.2.0.tar.gz.

File metadata

File hashes

Hashes for fastpluggy_notification_center-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1f819b53a130170238aceb46a8e51436a80bb21b0f308ddd01b833b809b9bd59
MD5 32d347598370f0e73449d65f98513b0a
BLAKE2b-256 2e349828c57e76958a4fdfdc405bac9dd3ee38fcb024809e321b5f5489bc2c87

See more details on using hashes here.

File details

Details for the file fastpluggy_notification_center-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fastpluggy_notification_center-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d03e67f156284beed6ee1925151fc6a60eb70a9f7eee40d1069b2fa929e102b
MD5 a2d89d8959e0225795a61146084d924b
BLAKE2b-256 490ed33fcff232f16294258a92d2641477eef606283388a13e38d0e76a6d7e9f

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