from svc_infra.loaders.base import BaseLoaderABCAbstract base class for content loaders. All loaders are async-first with sync wrappers provided for convenience. Subclasses must implement the `load()` method.
on_error: How to handle errors during loading. - "skip" (default): Log warning and skip failed items - "raise": Raise exception on first failure
>>> class MyLoader(BaseLoader): ... async def load(self) -> list[LoadedContent]: ... # Implement loading logic ... return [LoadedContent(content="...", source="...")] >>> >>> # Async usage (preferred) >>> loader = MyLoader() >>> contents = await loader.load() >>> >>> # Sync usage (convenience) >>> contents = loader.load_sync()