Source code for helix_ir.sources.base
"""Source protocol — all data sources implement this interface."""
from __future__ import annotations
from typing import Any, Iterable, Protocol, runtime_checkable
[docs]
@runtime_checkable
class Source(Protocol):
"""Protocol for all Helix IR data sources."""
[docs]
def read(self) -> Iterable[dict[str, Any]]:
"""Yield documents from this source."""
...
[docs]
def schema_hint(self) -> dict[str, Any] | None:
"""Return an optional schema hint dict, or None."""
...