mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-10 11:21:12 +00:00
implement abstract async extract on Fetcher, with simple switch
This commit is contained in:
@@ -10,7 +10,6 @@ from typing import (
|
||||
TypeVar,
|
||||
get_args,
|
||||
get_origin,
|
||||
overload,
|
||||
)
|
||||
|
||||
from pandas import DataFrame
|
||||
@@ -47,21 +46,34 @@ class Fetcher(Generic[Q, R]):
|
||||
"""Transform the params to the provider-specific query."""
|
||||
raise NotImplementedError
|
||||
|
||||
@overload
|
||||
@staticmethod
|
||||
async def extract_data(query: Q, credentials: Optional[Dict[str, str]]) -> Any:
|
||||
"""Extract the data from the provider."""
|
||||
async def extract_data_async(
|
||||
query: Q, credentials: Optional[Dict[str, str]]
|
||||
) -> Any:
|
||||
"""Asynchronously extract the data from the provider."""
|
||||
|
||||
@staticmethod
|
||||
def extract_data(query: Q, credentials: Optional[Dict[str, str]]) -> Any:
|
||||
"""Extract the data from the provider."""
|
||||
raise NotImplementedError
|
||||
|
||||
@staticmethod
|
||||
def transform_data(query: Q, data: Any, **kwargs) -> R:
|
||||
"""Transform the provider-specific data."""
|
||||
raise NotImplementedError
|
||||
|
||||
def __init_subclass__(cls, **kwargs):
|
||||
"""Initialize the subclass."""
|
||||
super().__init_subclass__(**kwargs)
|
||||
|
||||
if cls.extract_data_async != Fetcher.extract_data_async:
|
||||
cls.extract_data = cls.extract_data_async
|
||||
elif cls.extract_data == Fetcher.extract_data:
|
||||
raise NotImplementedError(
|
||||
"Fetcher subclass must implement either extract_data or extract_data_async"
|
||||
" method. If both are implemented, extract_data_async will be used as the"
|
||||
" default."
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def fetch_data(
|
||||
cls,
|
||||
|
||||
@@ -148,7 +148,7 @@ class BenzingaCompanyNewsFetcher(
|
||||
return BenzingaCompanyNewsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: BenzingaCompanyNewsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -132,7 +132,7 @@ class BenzingaWorldNewsFetcher(
|
||||
return BenzingaWorldNewsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: BenzingaWorldNewsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -36,7 +36,7 @@ class FMPAnalystEstimatesFetcher(
|
||||
return FMPAnalystEstimatesQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPAnalystEstimatesQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -45,7 +45,7 @@ class FMPAvailableIndicesFetcher(
|
||||
return FMPAvailableIndicesQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPAvailableIndicesQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -113,7 +113,7 @@ class FMPBalanceSheetFetcher(
|
||||
return FMPBalanceSheetQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPBalanceSheetQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -44,7 +44,7 @@ class FMPBalanceSheetGrowthFetcher(
|
||||
return FMPBalanceSheetGrowthQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPBalanceSheetGrowthQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -80,7 +80,7 @@ class FMPCalendarDividendFetcher(
|
||||
return FMPCalendarDividendQueryParams(**transformed_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPCalendarDividendQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -105,7 +105,7 @@ class FMPCalendarEarningsFetcher(
|
||||
return FMPCalendarEarningsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPCalendarEarningsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -48,7 +48,7 @@ class FMPCalendarSplitsFetcher(
|
||||
return FMPCalendarSplitsQueryParams(**transformed_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPCalendarSplitsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -120,7 +120,7 @@ class FMPCashFlowStatementFetcher(
|
||||
return FMPCashFlowStatementQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPCashFlowStatementQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -53,7 +53,7 @@ class FMPCashFlowStatementGrowthFetcher(
|
||||
return FMPCashFlowStatementGrowthQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPCashFlowStatementGrowthQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -46,7 +46,7 @@ class FMPCompanyFilingsFetcher(
|
||||
return FMPCompanyFilingsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPCompanyFilingsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -52,7 +52,7 @@ class FMPCompanyNewsFetcher(
|
||||
return FMPCompanyNewsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPCompanyNewsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -47,7 +47,7 @@ class FMPCompanyOverviewFetcher(
|
||||
return FMPCompanyOverviewQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPCompanyOverviewQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -82,7 +82,7 @@ class FMPCryptoHistoricalFetcher(
|
||||
return FMPCryptoHistoricalQueryParams(**transformed_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPCryptoHistoricalQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -48,7 +48,7 @@ class FMPCryptoSearchFetcher(
|
||||
return FMPCryptoSearchQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPCryptoSearchQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -75,7 +75,7 @@ class FMPCurrencyHistoricalFetcher(
|
||||
return FMPCurrencyHistoricalQueryParams(**transformed_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPCurrencyHistoricalQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -47,7 +47,7 @@ class FMPCurrencyPairsFetcher(
|
||||
return FMPCurrencyPairsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPCurrencyPairsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -51,7 +51,7 @@ class FMPDiscoveryFilingsFetcher(
|
||||
return FMPDiscoveryFilingsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPDiscoveryFilingsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -51,7 +51,7 @@ class FMPEarningsCallTranscriptFetcher(
|
||||
return FMPEarningsCallTranscriptQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPEarningsCallTranscriptQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -80,7 +80,7 @@ class FMPEconomicCalendarFetcher(
|
||||
return FMPEconomicCalendarQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPEconomicCalendarQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -80,11 +80,8 @@ class FMPEquityHistoricalFetcher(
|
||||
|
||||
return FMPEquityHistoricalQueryParams(**transformed_params)
|
||||
|
||||
# TODO: Fix fetcher to allow async/sync methods or turn everything async
|
||||
# @overloading the method does not work, it breaks the type hinting for the
|
||||
# synchronous method implemented in other providers
|
||||
@staticmethod
|
||||
async def extract_data( # pylint: disable=invalid-overridden-method
|
||||
async def extract_data_async(
|
||||
query: FMPEquityHistoricalQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -51,7 +51,7 @@ class FMPEquityOwnershipFetcher(
|
||||
return FMPEquityOwnershipQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPEquityOwnershipQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -35,7 +35,7 @@ class FMPEquityPeersFetcher(
|
||||
return FMPEquityPeersQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPEquityPeersQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -108,7 +108,7 @@ class FMPEquityQuoteFetcher(
|
||||
return FMPEquityQuoteQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPEquityQuoteQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -155,7 +155,7 @@ class FMPEquityScreenerFetcher(
|
||||
return FMPEquityScreenerQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPEquityScreenerQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -103,7 +103,7 @@ class FMPEquityValuationMultiplesFetcher(
|
||||
return FMPEquityValuationMultiplesQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPEquityValuationMultiplesQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -33,7 +33,7 @@ class FMPEtfCountriesFetcher(
|
||||
return FMPEtfCountriesQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPEtfCountriesQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -120,7 +120,7 @@ class FMPEtfHoldingsFetcher(
|
||||
return FMPEtfHoldingsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPEtfHoldingsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -43,7 +43,7 @@ class FMPEtfHoldingsDateFetcher(
|
||||
return FMPEtfHoldingsDateQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPEtfHoldingsDateQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -35,14 +35,14 @@ class FMPEtfHoldingsPerformanceFetcher(
|
||||
return FMPEtfHoldingsPerformanceQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPEtfHoldingsPerformanceQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
) -> List[Dict]:
|
||||
"""Return the raw data from the FMP endpoint."""
|
||||
# Get latest available holdings filing date
|
||||
dates = await FMPEtfHoldingsDateFetcher().extract_data(
|
||||
dates = await FMPEtfHoldingsDateFetcher().extract_data_async(
|
||||
FMPEtfHoldingsDateFetcher.transform_query(query.model_dump()),
|
||||
credentials,
|
||||
**kwargs,
|
||||
@@ -50,7 +50,7 @@ class FMPEtfHoldingsPerformanceFetcher(
|
||||
if dates is None:
|
||||
return []
|
||||
# Get holdings for that date
|
||||
holdings = await FMPEtfHoldingsFetcher().extract_data(
|
||||
holdings = await FMPEtfHoldingsFetcher().extract_data_async(
|
||||
FMPEtfHoldingsFetcher.transform_query(
|
||||
{"symbol": query.symbol, "date": max([d["date"] for d in dates])}
|
||||
),
|
||||
@@ -70,7 +70,7 @@ class FMPEtfHoldingsPerformanceFetcher(
|
||||
holdings_str = (
|
||||
",".join(holding_chunk) if len(holding_chunk) > 1 else holding_chunk[0]
|
||||
)
|
||||
_performance = await FMPPricePerformanceFetcher().extract_data(
|
||||
_performance = await FMPPricePerformanceFetcher().extract_data_async(
|
||||
FMPPricePerformanceFetcher.transform_query({"symbol": holdings_str}),
|
||||
credentials,
|
||||
**kwargs,
|
||||
|
||||
@@ -59,7 +59,7 @@ class FMPEtfInfoFetcher(
|
||||
return FMPEtfInfoQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPEtfInfoQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -87,7 +87,7 @@ class FMPEtfSearchFetcher(
|
||||
return FMPEtfSearchQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPEtfSearchQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -34,7 +34,7 @@ class FMPEtfSectorsFetcher(
|
||||
return FMPEtfSectorsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPEtfSectorsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -49,7 +49,7 @@ class FMPExecutiveCompensationFetcher(
|
||||
return FMPExecutiveCompensationQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPExecutiveCompensationQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -56,7 +56,7 @@ class FMPFinancialRatiosFetcher(
|
||||
return FMPFinancialRatiosQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPFinancialRatiosQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -68,7 +68,7 @@ class FMPHistoricalDividendsFetcher(
|
||||
return FMPHistoricalDividendsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPHistoricalDividendsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -35,7 +35,7 @@ class FMPHistoricalEmployeesFetcher(
|
||||
return FMPHistoricalEmployeesQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPHistoricalEmployeesQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -90,7 +90,7 @@ class FMPHistoricalEpsFetcher(
|
||||
return FMPHistoricalEpsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPHistoricalEpsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -43,7 +43,7 @@ class FMPHistoricalSplitsFetcher(
|
||||
return FMPHistoricalSplitsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPHistoricalSplitsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -143,7 +143,7 @@ class FMPIncomeStatementFetcher(
|
||||
return FMPIncomeStatementQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPIncomeStatementQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -50,7 +50,7 @@ class FMPIncomeStatementGrowthFetcher(
|
||||
return FMPIncomeStatementGrowthQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPIncomeStatementGrowthQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -61,7 +61,7 @@ class FMPIndexConstituentsFetcher(
|
||||
return FMPIndexConstituentsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPIndexConstituentsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -64,7 +64,7 @@ class FMPInsiderTradingFetcher(
|
||||
return FMPInsiderTradingQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPInsiderTradingQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -140,7 +140,7 @@ class FMPInstitutionalOwnershipFetcher(
|
||||
return FMPInstitutionalOwnershipQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPInstitutionalOwnershipQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -43,7 +43,7 @@ class FMPKeyExecutivesFetcher(
|
||||
return FMPKeyExecutivesQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPKeyExecutivesQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -212,7 +212,7 @@ class FMPKeyMetricsFetcher(
|
||||
return FMPKeyMetricsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPKeyMetricsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -81,7 +81,7 @@ class FMPMarketIndicesFetcher(
|
||||
return FMPMarketIndicesQueryParams(**transformed_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPMarketIndicesQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -92,7 +92,7 @@ class FMPMarketSnapshotsFetcher(
|
||||
return FMPMarketSnapshotsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPMarketSnapshotsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -50,7 +50,7 @@ class FMPPricePerformanceFetcher(
|
||||
return FMPPricePerformanceQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPPricePerformanceQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -54,7 +54,7 @@ class FMPPriceTargetFetcher(
|
||||
return FMPPriceTargetQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPPriceTargetQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -35,7 +35,7 @@ class FMPPriceTargetConsensusFetcher(
|
||||
return FMPPriceTargetConsensusQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPPriceTargetConsensusQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -43,7 +43,7 @@ class FMPRevenueBusinessLineFetcher(
|
||||
return FMPRevenueBusinessLineQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPRevenueBusinessLineQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -43,7 +43,7 @@ class FMPRevenueGeographicFetcher(
|
||||
return FMPRevenueGeographicQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPRevenueGeographicQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -35,7 +35,7 @@ class FMPRiskPremiumFetcher(
|
||||
return FMPRiskPremiumQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPRiskPremiumQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -48,7 +48,7 @@ class FMPShareStatisticsFetcher(
|
||||
return FMPShareStatisticsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPShareStatisticsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -69,7 +69,7 @@ class FMPTreasuryRatesFetcher(
|
||||
return FMPTreasuryRatesQueryParams(**transformed_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPTreasuryRatesQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -47,7 +47,7 @@ class FMPWorldNewsFetcher(
|
||||
return FMPWorldNewsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FMPWorldNewsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -91,7 +91,7 @@ class FredSearchFetcher(
|
||||
return transformed_params
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FredSearchQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -112,7 +112,7 @@ class FredSeriesFetcher(
|
||||
return FredSeriesQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: FredSeriesQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -109,7 +109,7 @@ class IntrinioBalanceSheetFetcher(
|
||||
return IntrinioBalanceSheetQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioBalanceSheetQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -165,7 +165,7 @@ class IntrinioCalendarIpoFetcher(
|
||||
return IntrinioCalendarIpoQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioCalendarIpoQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -106,7 +106,7 @@ class IntrinioCashFlowStatementFetcher(
|
||||
return IntrinioCashFlowStatementQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioCashFlowStatementQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -82,7 +82,7 @@ class IntrinioCompanyFilingsFetcher(
|
||||
return IntrinioCompanyFilingsQueryParams(**transformed_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioCompanyFilingsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -61,7 +61,7 @@ class IntrinioCompanyNewsFetcher(
|
||||
return IntrinioCompanyNewsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioCompanyNewsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -47,7 +47,7 @@ class IntrinioCurrencyPairsFetcher(
|
||||
return IntrinioCurrencyPairsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioCurrencyPairsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -181,7 +181,7 @@ class IntrinioEquityHistoricalFetcher(
|
||||
|
||||
# pylint: disable=protected-access
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioEquityHistoricalQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -45,7 +45,7 @@ class IntrinioEquityInfoFetcher(
|
||||
return IntrinioEquityInfoQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioEquityInfoQueryParams, # pylint: disable=unused-argument
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -117,7 +117,7 @@ class IntrinioEquityQuoteFetcher(
|
||||
return IntrinioEquityQuoteQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioEquityQuoteQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -48,7 +48,7 @@ class IntrinioFinancialAttributesFetcher(
|
||||
return IntrinioFinancialAttributesQueryParams(**transformed_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioFinancialAttributesQueryParams, # pylint: disable=unused-argument
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -66,7 +66,7 @@ class IntrinioFredSeriesFetcher(
|
||||
return IntrinioFredSeriesQueryParams(**transformed_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioFredSeriesQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -51,7 +51,7 @@ class IntrinioHistoricalAttributesFetcher(
|
||||
return IntrinioHistoricalAttributesQueryParams(**transformed_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioHistoricalAttributesQueryParams, # pylint: disable=unused-argument
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -69,7 +69,7 @@ class IntrinioHistoricalDividendsFetcher(
|
||||
return IntrinioHistoricalDividendsQueryParams(**transformed_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioHistoricalDividendsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -107,7 +107,7 @@ class IntrinioIncomeStatementFetcher(
|
||||
return IntrinioIncomeStatementQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioIncomeStatementQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -121,7 +121,7 @@ class IntrinioInsiderTradingFetcher(
|
||||
return IntrinioInsiderTradingQueryParams(**transformed_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioInsiderTradingQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -75,7 +75,7 @@ class IntrinioInstitutionalOwnershipFetcher(
|
||||
return IntrinioInstitutionalOwnershipQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioInstitutionalOwnershipQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -55,7 +55,7 @@ class IntrinioKeyMetricsFetcher(
|
||||
return IntrinioKeyMetricsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioKeyMetricsQueryParams, # pylint: disable=unused-argument
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -36,7 +36,7 @@ class IntrinioLatestAttributesFetcher(
|
||||
return IntrinioLatestAttributesQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioLatestAttributesQueryParams, # pylint: disable=unused-argument
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -67,7 +67,7 @@ class IntrinioMarketIndicesFetcher(
|
||||
return IntrinioMarketIndicesQueryParams(**transformed_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioMarketIndicesQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -72,7 +72,7 @@ class IntrinioOptionsChainsFetcher(
|
||||
return IntrinioOptionsChainsQueryParams(**transform_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioOptionsChainsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -73,7 +73,7 @@ class IntrinioOptionsUnusualFetcher(
|
||||
return IntrinioOptionsUnusualQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioOptionsUnusualQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -43,7 +43,7 @@ class IntrinioSearchAttributesFetcher(
|
||||
return IntrinioSearchAttributesQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioSearchAttributesQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -56,7 +56,7 @@ class IntrinioShareStatisticsFetcher(
|
||||
return IntrinioShareStatisticsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioShareStatisticsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -50,7 +50,7 @@ class IntrinioWorldNewsFetcher(
|
||||
return IntrinioWorldNewsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: IntrinioWorldNewsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -116,7 +116,7 @@ class PolygonBalanceSheetFetcher(
|
||||
return PolygonBalanceSheetQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: PolygonBalanceSheetQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -98,7 +98,7 @@ class PolygonCashFlowStatementFetcher(
|
||||
return PolygonCashFlowStatementQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: PolygonCashFlowStatementQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -84,7 +84,7 @@ class PolygonCompanyNewsFetcher(
|
||||
return PolygonCompanyNewsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: PolygonCompanyNewsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -81,7 +81,7 @@ class PolygonCryptoHistoricalFetcher(
|
||||
return PolygonCryptoHistoricalQueryParams(**transformed_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: PolygonCryptoHistoricalQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -77,7 +77,7 @@ class PolygonCurrencyHistoricalFetcher(
|
||||
return PolygonCurrencyHistoricalQueryParams(**transformed_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: PolygonCurrencyHistoricalQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -115,7 +115,7 @@ class PolygonCurrencyPairsFetcher(
|
||||
return PolygonCurrencyPairsQueryParams(**transform_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: PolygonCurrencyPairsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -109,7 +109,7 @@ class PolygonEquityHistoricalFetcher(
|
||||
return PolygonEquityHistoricalQueryParams(**transformed_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data( # pylint: disable=protected-access
|
||||
async def extract_data_async( # pylint: disable=protected-access
|
||||
query: PolygonEquityHistoricalQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -154,7 +154,7 @@ class PolygonEquityNBBOFetcher(
|
||||
return PolygonEquityNBBOQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: PolygonEquityNBBOQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -145,7 +145,7 @@ class PolygonIncomeStatementFetcher(
|
||||
return PolygonIncomeStatementQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: PolygonIncomeStatementQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -77,7 +77,7 @@ class PolygonMarketIndicesFetcher(
|
||||
return PolygonMarketIndicesQueryParams(**transformed_params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: PolygonMarketIndicesQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
@@ -101,7 +101,7 @@ class PolygonMarketSnapshotsFetcher(
|
||||
return PolygonMarketSnapshotsQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
async def extract_data(
|
||||
async def extract_data_async(
|
||||
query: PolygonMarketSnapshotsQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
|
||||
Reference in New Issue
Block a user