Skip to content

src/dazzle_back/events/envelope.py

Generated: 2026-03-30T04:38:46.054707+00:00

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

Event Envelope Schema for Dazzle Event-First Architecture.

This module defines the canonical event envelope used throughout the Dazzle event system. The schema is Kafka-shaped, meaning it follows Kafka's conceptual model (topics, partitions, keys) even when running on SQLite.

Rule 0: The event log...

Key Exports

  • EventEnvelope
  • topic
  • action
  • entity_name
  • to_dict
  • to_json
  • from_dict
  • from_json
  • create
  • create_delayed
  • with_correlation
  • caused_by

Dependencies

Imports

  • __future__.annotations
  • json
  • dataclasses.dataclass
  • dataclasses.field
  • datetime.UTC
  • datetime.datetime
  • typing.Any
  • uuid.UUID
  • uuid.uuid4

Event Interactions

None detected.

Invariants and Assumptions

No invariants documented.

Tests

  • tests/unit/test_events.py
  • tests/unit/test_events_api.py

Notes

This page was automatically generated by tools/gen_reference_docs.py.