Events API

This module contains the CloudEvent implementation used by Django Dispatch.

CloudEvent

class django_broadcaster.events.CloudEvent(event_type: str, source: str, data: Any | None = None, subject: str = '', data_content_type: str = 'application/json', data_schema: str = '', spec_version: str = '1.0')[source]

Bases: object

CloudEvent interface compatible with CloudEvents specification

__init__(event_type: str, source: str, data: Any | None = None, subject: str = '', data_content_type: str = 'application/json', data_schema: str = '', spec_version: str = '1.0')[source]
to_dict() Dict[str, Any][source]

Convert to dictionary representation

to_dict() Dict[str, Any][source]

Convert to dictionary representation