Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

forge-mvc-notifications

Notifications in-app opt-in pour Forge : créer des notifications destinées aux utilisateurs (élève inscrit, note publiée, devoir à rendre) dans une table notifications, les lire, les marquer comme lues.

Périmètre V1 : notifications in-app (des lignes en base, affichées dans l'IHM). La livraison hors application (email, push) reste à la charge de l'application, par exemple en combinant ce paquet avec forge-mvc-jobs et forge-mvc-mail.

Installation

pip install --pre forge-mvc-notifications

En développement : pip install -e ./packages/forge-mvc-notifications.

Mise en place de la table

forge notifications:init   # copie la migration dans mvc/migrations/
forge migration:apply      # crée la table notifications

Utilisation

from forge_mvc_notifications import notify, get_notifications, unread_count, mark_read

notify("eleve.42", "Votre note est publiée", type="info", data={"cours": "maths"})

print(unread_count("eleve.42"))            # 1
for n in get_notifications("eleve.42", unread_only=True):
    print(n.message, n.created_at)
mark_read(1)

L'API expose notify, get_notifications, unread_count, mark_read, mark_all_read, plus Notification, NotificationError, TABLE_NAME, MAX_LIMIT.

Périmètre

  • Stockage in-app uniquement (lignes en base).
  • Hors périmètre : livraison email/push (à combiner avec forge-mvc-jobs + forge-mvc-mail), préférences de notification, temps réel.

Documentation complète : https://forgemvc.com/docs/forge/.

Release files for forge-mvc-notifications 1.0.0rc7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for forge-mvc-notifications 1.0.0rc7
File Size Uploaded
forge_mvc_notifications-1.0.0rc7.tar.gz 11.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for forge-mvc-notifications 1.0.0rc7
File Interpreter ABI Platform
forge_mvc_notifications-1.0.0rc7-py3-none-any.whl Python 3 none any Details

Total release size: 21.8 kB

Release files / forge_mvc_notifications-1.0.0rc7.tar.gz

Download URL forge_mvc_notifications-1.0.0rc7.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2f0da708ae5d4a1fe36385d6a7c8a1830abc63d33dbf4b8626aa30a6a93bbdd0
BLAKE2b-256 checksum
How to use checksums
64a8dc455f28aafb2b21bc78ba29d58a36f9e9a0ac52b21448643840792f186c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / forge_mvc_notifications-1.0.0rc7-py3-none-any.whl

Download URL forge_mvc_notifications-1.0.0rc7-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ae140cc3b174113421ce8fb2eab94e420f3d6a343341dea1684216113bd5198
BLAKE2b-256 checksum
How to use checksums
36289a4d1f17a885ce097f3c0206f1668fa1d95bf928d4543c3d9a29aec0765d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page