mirror of
https://github.com/borbann-platform/backend-api.git
synced 2025-12-18 12:14:05 +01:00
22 lines
434 B
Python
22 lines
434 B
Python
"""
|
|
Define the DataSourceAdapter protocol for ingestion adapters.
|
|
"""
|
|
|
|
from typing import Protocol
|
|
from models.ingestion import AdapterRecord
|
|
|
|
|
|
class DataSourceAdapter(Protocol):
|
|
"""
|
|
Protocol for data source adapters.
|
|
"""
|
|
|
|
async def fetch(self) -> list[AdapterRecord]:
|
|
"""
|
|
Fetch data from the source.
|
|
|
|
Returns:
|
|
A list of records, each represented as a dict.
|
|
"""
|
|
...
|