Base Fetcher
All fetchers must inherit from the DataFetcherStrategy class. This class provides the basic structure for fetchers and defines the methods that must be implemented by all fetchers.
fetch_data()
abstractmethod
This method should implement the data fetch logic.
All the necessary information should be provided in the constructor.
| RETURNS | DESCRIPTION |
|---|---|
DataFrame
|
pd.DataFrame: The fetched data |
get_cached_data()
Fetch data from the cache.
| RETURNS | DESCRIPTION |
|---|---|
ChartData | None
|
ChartData or None if not found. |
invalidate_cache()
Invalidate the cache for the data fetcher.
make_cache_key()
abstractmethod
This method should generate a cache key for the fetched data.
Every data fetcher should implement this method to support caching.
| RETURNS | DESCRIPTION |
|---|---|
str
|
The cache key
TYPE:
|