Skip to main content

Notification primitives for Flametrench: per-recipient records, read-state lifecycle, and inbox queries (ADR 0022).

Project description

flametrench-notify

Per-recipient notification records and lifecycle state machine for the Flametrench v0.4 platform (ADR 0022).

What this is

A durable, per-recipient record that something happened, with read-state (unread ⇄ read → dismissed). This is the record/event layer — not a delivery engine. Delivery (email, push, SMS) is an adopter concern; this primitive stores the notification and emits a creation event for adopters to react to.

Install

pip install flametrench-notify

Requires Python ≥ 3.11 and flametrench-ids >= 0.4.0.

Quick start

from flametrench_notify import InMemoryNotificationStore

store = InMemoryNotificationStore()

n = store.create_notification(
    scope="org_0190f2a81b3c7abc8123000000000004",
    recipient_usr_id="usr_0190f2a81b3c7abc8123000000000002",
    type="comment.mention",
    subject={"kind": "doc", "id": "doc_2f9c1a..."},
    data={"actor_name": "Alice", "snippet": "…@bob take a look"},
)
# n.state == NotificationState.UNREAD

store.mark_read(n.id)
store.mark_unread(n.id)   # toggle back
store.dismiss(n.id)       # terminal

License

Apache-2.0 © NDC Digital, LLC

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

flametrench_notify-0.4.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

flametrench_notify-0.4.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file flametrench_notify-0.4.0.tar.gz.

File metadata

  • Download URL: flametrench_notify-0.4.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flametrench_notify-0.4.0.tar.gz
Algorithm Hash digest
SHA256 bee8fa4b36fc2b8e7520166a6c3eba35c9a3d924923c464bcf6dcc29ad0041cf
MD5 ee26ed5f74b46765f90a7322da880f44
BLAKE2b-256 3e3ab8ce6ee4deddea4ad9dae7d1ca9c861c01f3958f00e4f3e8e3212a62013d

See more details on using hashes here.

Provenance

The following attestation bundles were made for flametrench_notify-0.4.0.tar.gz:

Publisher: publish.yml on flametrench/notify-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flametrench_notify-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flametrench_notify-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3eaf449e8cccd4c998a4edc05aa1ec697cacd6e0410e5787016f9120469692e6
MD5 fde12944fb7ac4c06f14b5703cf1ce24
BLAKE2b-256 e46e7accca9185b217133e08685fc89b7dc70dad7fef5ca4934b03c170076c98

See more details on using hashes here.

Provenance

The following attestation bundles were made for flametrench_notify-0.4.0-py3-none-any.whl:

Publisher: publish.yml on flametrench/notify-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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