corvix.hydration.base ===================== .. py:module:: corvix.hydration.base .. autoapi-nested-parse:: Provider interfaces and shared context for hydration. These names are preserved for backward compatibility; the canonical definitions live in :mod:`corvix.pipeline.provider`. Classes ------- .. autoapisummary:: corvix.hydration.base.HydrationProvider corvix.hydration.base.HydrationContext Module Contents --------------- .. py:class:: HydrationProvider Bases: :py:obj:`Protocol` Provider that completes missing canonical fields on a :class:`~corvix.domain.Notification`. Field providers mutate the notification in-place by returning a (possibly replaced) :class:`~corvix.domain.Notification` with missing required fields filled in (e.g. ``subject_url``, ``web_url``). .. py:attribute:: name :type: str .. py:method:: hydrate(_notification: corvix.domain.Notification, _client: corvix.pipeline.base.JsonFetchClient, _ctx: PipelineContext, /) -> corvix.domain.Notification Return a notification with any missing required fields filled in. .. py:class:: HydrationContext Bases: :py:obj:`corvix.pipeline.base.RequestContext` Per-cycle request budget and URL cache shared across all pipeline providers. A single :class:`PipelineContext` is created per :meth:`PipelineEngine.run` call and passed to every provider, so that URL responses cached by a field-completion provider are visible to subsequent context providers in the same cycle. .. py:method:: get_json(client: corvix.pipeline.base.JsonFetchClient, url: str, timeout_seconds: float) -> corvix.types.JsonValue Fetch and cache a JSON payload; raises if the request budget is exhausted.