corvix.enrichment.base ====================== .. py:module:: corvix.enrichment.base .. autoapi-nested-parse:: Provider interfaces and shared context for enrichment. Classes ------- .. autoapisummary:: corvix.enrichment.base.JsonFetchClient corvix.enrichment.base.EnrichmentProvider corvix.enrichment.base.EnrichmentContext Module Contents --------------- .. py:class:: JsonFetchClient Bases: :py:obj:`Protocol` Client capability required by enrichment providers. .. py:method:: fetch_json_url(url: str, timeout_seconds: float = 30.0) -> corvix.types.JsonValue Fetch JSON from a fully-qualified API URL. .. py:class:: EnrichmentProvider Bases: :py:obj:`Protocol` Protocol implemented by enrichment providers. .. py:attribute:: name :type: str .. py:method:: enrich(notification: corvix.domain.Notification, client: JsonFetchClient, ctx: EnrichmentContext) -> dict[str, object] .. py:class:: EnrichmentContext Per-cycle provider context with request budget and URL cache. .. py:attribute:: max_requests_per_cycle :type: int .. py:attribute:: url_cache :type: dict[str, corvix.types.JsonValue] .. py:attribute:: request_count :type: int :value: 0 .. py:method:: get_json(client: JsonFetchClient, url: str, timeout_seconds: float) -> corvix.types.JsonValue Fetch and cache a JSON payload for this cycle.