Skip to content

RecordedRaw

Bases: BaseModel

DTO representing a raw event received from the event store.

Used for low-level event store operations. Wraps a RawEvent with additional metadata (position and tenant id).

Attributes:

Name Type Description
entry RawEvent

The raw event data and metadata.

position Position

Position of the event in the event store.

tenant_id TenantId

Tenant identifier (for multi-tenant scenarios).

Source code in event_sourcery/_event_store/event/dto.py
@dataclasses.dataclass(frozen=True)
class RecordedRaw(BaseModel):
    """
    DTO representing a raw event received from the event store.

    Used for low-level event store operations.
    Wraps a RawEvent with additional metadata (position and tenant id).

    Attributes:
        entry (RawEvent): The raw event data and metadata.
        position (Position): Position of the event in the event store.
        tenant_id (TenantId): Tenant identifier (for multi-tenant scenarios).
    """

    entry: RawEvent
    position: Position
    tenant_id: TenantId = DEFAULT_TENANT