add async overload to Fetcher.extract_data

This commit is contained in:
tehcoderer
2023-11-28 10:14:06 -05:00
parent d920d73def
commit c5cb9662d7
2 changed files with 7 additions and 2 deletions

View File

@@ -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."""

View File

@@ -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):