mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-26 19:22:23 +00:00
add async overload to Fetcher.extract_data
This commit is contained in:
@@ -10,6 +10,7 @@ from typing import (
|
||||
TypeVar,
|
||||
get_args,
|
||||
get_origin,
|
||||
overload,
|
||||
)
|
||||
|
||||
from pandas import DataFrame
|
||||
@@ -46,6 +47,11 @@ 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."""
|
||||
|
||||
@staticmethod
|
||||
def extract_data(query: Q, credentials: Optional[Dict[str, str]]) -> Any:
|
||||
"""Extract the data from the provider."""
|
||||
|
||||
@@ -9,8 +9,7 @@ from openbb_core.provider.standard_models.calendar_splits import (
|
||||
CalendarSplitsData,
|
||||
CalendarSplitsQueryParams,
|
||||
)
|
||||
from openbb_core.provider.utils.helpers import get_querystring
|
||||
from openbb_fmp.utils.helpers import get_data_many
|
||||
from openbb_fmp.utils.helpers import create_url, get_data_many
|
||||
|
||||
|
||||
class FMPCalendarSplitsQueryParams(CalendarSplitsQueryParams):
|
||||
|
||||
Reference in New Issue
Block a user