corvix.enrichment.engine ======================== .. py:module:: corvix.enrichment.engine .. autoapi-nested-parse:: Enrichment engine for attaching contextual data to notifications. Classes ------- .. autoapisummary:: corvix.enrichment.engine.EnrichmentRunResult corvix.enrichment.engine.EnrichmentEngine Functions --------- .. autoapisummary:: corvix.enrichment.engine._is_str_object_map corvix.enrichment.engine._set_nested_namespace Module Contents --------------- .. py:function:: _is_str_object_map(value: object) -> TypeIs[dict[str, object]] .. py:class:: EnrichmentRunResult Result of enriching one poll cycle. .. py:attribute:: contexts_by_notification_key :type: dict[str, dict[str, object]] .. py:attribute:: errors :type: list[str] :value: [] .. py:property:: contexts_by_thread_id :type: dict[str, dict[str, object]] Backward-compatible thread-keyed view of contexts. .. py:class:: EnrichmentEngine Runs configured enrichment providers over notifications. .. py:attribute:: config :type: corvix.config.EnrichmentConfig .. py:attribute:: providers :type: list[corvix.enrichment.base.EnrichmentProvider] .. py:method:: run(notifications: list[corvix.domain.Notification], client: corvix.enrichment.base.JsonFetchClient, clients_by_account: dict[str, corvix.enrichment.base.JsonFetchClient] | None = None) -> EnrichmentRunResult Run enabled providers for all notifications in one cycle. .. py:function:: _set_nested_namespace(root: dict[str, object], namespace: str, payload: dict[str, object]) -> None Merge payload under a dot-delimited namespace.