Spaces:
Runtime error
Runtime error
Download src/nepse_intelligence/layer1_scraper/interfaces.py from paulhemb/NepseAlphaAI: direct link, hf CLI and curl.
- Browser
- Download file 768 Bytes
-
https://huggingface.co/spaces/paulhemb/NepseAlphaAI/resolve/main/src/nepse_intelligence/layer1_scraper/interfaces.py
- Command line
-
hf download hf://spaces/paulhemb/NepseAlphaAI/src/nepse_intelligence/layer1_scraper/interfaces.py
-
curl -L -o interfaces.py https://huggingface.co/spaces/paulhemb/NepseAlphaAI/resolve/main/src/nepse_intelligence/layer1_scraper/interfaces.py
768 Bytes
| """Protocols / abstract base classes for dependency injection.""" | |
| from typing import Protocol, Any, List, Dict, Optional | |
| from datetime import date | |
| class CacheProtocol(Protocol): | |
| def get(self, key: str) -> Any: ... | |
| def set(self, key: str, value: Any, ttl: int) -> None: ... | |
| class ScraperProtocol(Protocol): | |
| """Interface that NepseScraper implements.""" | |
| def fetch_live_nepse(self) -> Optional[Any]: ... | |
| def fetch_market_indices(self, analysis_date: Optional[str] = None) -> Optional[Dict]: ... | |
| def fetch_datewise_indices(self, index_id: int = 1) -> Optional[Dict]: ... | |
| def fetch_52w_high_low(self) -> Optional[List[Dict]]: ... | |
| def fetch_holidays(self) -> Optional[List[Dict]]: ... | |
| def fetch_company_master(self) -> List[Dict]: ... |