Download src/reference_db/adapters/base.py from offCanada/reference-db-system: direct link, hf CLI and curl.
- Browser
- Download file 496 Bytes
-
https://huggingface.co/offCanada/reference-db-system/resolve/main/src/reference_db/adapters/base.py
- Command line
-
hf download hf://offCanada/reference-db-system/src/reference_db/adapters/base.py
-
curl -L -o base.py https://huggingface.co/offCanada/reference-db-system/resolve/main/src/reference_db/adapters/base.py
496 Bytes
| from abc import ABC, abstractmethod | |
| from collections.abc import Iterator | |
| class RetailerAdapter(ABC): | |
| """Common interface for all retailer data sources.""" | |
| def retailer(self) -> str: | |
| """Return the retailer name.""" | |
| def products(self) -> Iterator[dict]: | |
| """Yield standardized product records.""" | |
| def nutrition(self) -> Iterator[dict]: | |
| """Yield standardized nutrition records.""" | |