From fea3b40cc910acd029a5c0a1ecca9cac0c2300f0 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Mon, 18 Sep 2023 12:12:21 +0200 Subject: Lint and init --- openbb_sdk/providers/alpha_vantage/__init__.py | 0 .../alpha_vantage/openbb_alpha_vantage/__init__.py | 3 +-- openbb_sdk/providers/benzinga/__init__.py | 0 openbb_sdk/providers/benzinga/openbb_benzinga/__init__.py | 3 +-- .../benzinga/openbb_benzinga/models/global_news.py | 3 +-- .../benzinga/openbb_benzinga/models/stock_news.py | 3 +-- openbb_sdk/providers/cboe/__init__.py | 0 openbb_sdk/providers/cboe/openbb_cboe/__init__.py | 3 +-- .../cboe/openbb_cboe/models/available_indices.py | 3 +-- .../openbb_cboe/models/european_index_constituents.py | 3 +-- .../cboe/openbb_cboe/models/european_index_historical.py | 3 +-- .../providers/cboe/openbb_cboe/models/futures_curve.py | 3 +-- .../providers/cboe/openbb_cboe/models/index_search.py | 3 +-- .../providers/cboe/openbb_cboe/models/index_snapshots.py | 15 +++++++-------- .../cboe/openbb_cboe/models/major_indices_historical.py | 11 +++++------ .../providers/cboe/openbb_cboe/models/options_chains.py | 11 +++++------ .../providers/cboe/openbb_cboe/models/stock_historical.py | 13 ++++++------- .../providers/cboe/openbb_cboe/models/stock_info.py | 13 ++++++------- .../providers/cboe/openbb_cboe/models/stock_search.py | 3 +-- openbb_sdk/providers/fmp/__init__.py | 0 openbb_sdk/providers/fmp/openbb_fmp/__init__.py | 3 +-- .../providers/fmp/openbb_fmp/models/analyst_estimates.py | 3 +-- .../providers/fmp/openbb_fmp/models/available_indices.py | 3 +-- .../providers/fmp/openbb_fmp/models/balance_sheet.py | 3 +-- .../fmp/openbb_fmp/models/balance_sheet_growth.py | 3 +-- openbb_sdk/providers/fmp/openbb_fmp/models/cash_flow.py | 3 +-- .../providers/fmp/openbb_fmp/models/cash_flow_growth.py | 3 +-- .../providers/fmp/openbb_fmp/models/company_overview.py | 3 +-- .../providers/fmp/openbb_fmp/models/crypto_historical.py | 3 +-- .../providers/fmp/openbb_fmp/models/dividend_calendar.py | 3 +-- .../providers/fmp/openbb_fmp/models/earnings_calendar.py | 3 +-- .../fmp/openbb_fmp/models/earnings_call_transcript.py | 3 +-- .../fmp/openbb_fmp/models/executive_compensation.py | 3 +-- .../providers/fmp/openbb_fmp/models/financial_ratios.py | 3 +-- .../providers/fmp/openbb_fmp/models/forex_historical.py | 3 +-- openbb_sdk/providers/fmp/openbb_fmp/models/forex_pairs.py | 3 +-- openbb_sdk/providers/fmp/openbb_fmp/models/global_news.py | 3 +-- .../fmp/openbb_fmp/models/historical_dividends.py | 3 +-- .../fmp/openbb_fmp/models/historical_employees.py | 3 +-- .../fmp/openbb_fmp/models/historical_stock_splits.py | 3 +-- .../providers/fmp/openbb_fmp/models/income_statement.py | 3 +-- .../fmp/openbb_fmp/models/income_statement_growth.py | 3 +-- .../fmp/openbb_fmp/models/institutional_ownership.py | 3 +-- .../providers/fmp/openbb_fmp/models/key_executives.py | 3 +-- openbb_sdk/providers/fmp/openbb_fmp/models/key_metrics.py | 3 +-- .../fmp/openbb_fmp/models/major_indices_constituents.py | 3 +-- .../fmp/openbb_fmp/models/major_indices_historical.py | 3 +-- .../providers/fmp/openbb_fmp/models/price_target.py | 3 +-- .../fmp/openbb_fmp/models/price_target_consensus.py | 3 +-- .../fmp/openbb_fmp/models/revenue_business_line.py | 3 +-- .../providers/fmp/openbb_fmp/models/revenue_geographic.py | 3 +-- .../providers/fmp/openbb_fmp/models/risk_premium.py | 3 +-- openbb_sdk/providers/fmp/openbb_fmp/models/sec_filings.py | 3 +-- .../providers/fmp/openbb_fmp/models/share_statistics.py | 3 +-- .../providers/fmp/openbb_fmp/models/stock_historical.py | 3 +-- .../fmp/openbb_fmp/models/stock_insider_trading.py | 3 +-- .../providers/fmp/openbb_fmp/models/stock_multiples.py | 3 +-- openbb_sdk/providers/fmp/openbb_fmp/models/stock_news.py | 3 +-- .../providers/fmp/openbb_fmp/models/stock_ownership.py | 3 +-- openbb_sdk/providers/fmp/openbb_fmp/models/stock_peers.py | 3 +-- openbb_sdk/providers/fmp/openbb_fmp/models/stock_quote.py | 3 +-- .../providers/fmp/openbb_fmp/models/stock_splits.py | 3 +-- .../providers/fmp/openbb_fmp/models/treasury_rates.py | 3 +-- openbb_sdk/providers/fred/__init__.py | 0 openbb_sdk/providers/fred/openbb_fred/__init__.py | 3 +-- openbb_sdk/providers/intrinio/__init__.py | 0 openbb_sdk/providers/intrinio/openbb_intrinio/__init__.py | 3 +-- .../intrinio/openbb_intrinio/models/balance_sheet.py | 3 +-- .../intrinio/openbb_intrinio/models/cash_flow.py | 3 +-- .../intrinio/openbb_intrinio/models/forex_pairs.py | 3 +-- .../intrinio/openbb_intrinio/models/global_news.py | 3 +-- .../intrinio/openbb_intrinio/models/income_statement.py | 3 +-- .../intrinio/openbb_intrinio/models/stock_historical.py | 5 ++--- .../intrinio/openbb_intrinio/models/stock_news.py | 3 +-- .../intrinio/openbb_intrinio/models/stock_quote.py | 5 ++--- openbb_sdk/providers/polygon/__init__.py | 0 openbb_sdk/providers/polygon/openbb_polygon/__init__.py | 3 +-- .../polygon/openbb_polygon/models/balance_sheet.py | 5 ++--- .../providers/polygon/openbb_polygon/models/cash_flow.py | 5 ++--- .../polygon/openbb_polygon/models/crypto_historical.py | 3 +-- .../polygon/openbb_polygon/models/forex_historical.py | 3 +-- .../polygon/openbb_polygon/models/forex_pairs.py | 3 +-- .../polygon/openbb_polygon/models/income_statement.py | 5 ++--- .../openbb_polygon/models/major_indices_historical.py | 3 +-- .../polygon/openbb_polygon/models/stock_historical.py | 3 +-- .../providers/polygon/openbb_polygon/models/stock_news.py | 3 +-- openbb_sdk/providers/quandl/__init__.py | 0 openbb_sdk/providers/quandl/openbb_quandl/__init__.py | 1 - openbb_sdk/providers/quandl/openbb_quandl/models/cot.py | 3 +-- .../providers/quandl/openbb_quandl/models/cot_search.py | 1 - .../quandl/openbb_quandl/models/sp500_multiples.py | 1 - openbb_sdk/providers/utils/unit_test_generator.py | 4 +++- openbb_sdk/providers/yfinance/__init__.py | 0 openbb_sdk/providers/yfinance/openbb_yfinance/__init__.py | 1 - .../yfinance/openbb_yfinance/models/available_indices.py | 3 +-- .../yfinance/openbb_yfinance/models/crypto_historical.py | 3 +-- .../yfinance/openbb_yfinance/models/forex_historical.py | 3 +-- .../yfinance/openbb_yfinance/models/futures_curve.py | 1 - .../yfinance/openbb_yfinance/models/futures_historical.py | 5 ++--- .../openbb_yfinance/models/major_indices_historical.py | 3 +-- .../yfinance/openbb_yfinance/models/stock_historical.py | 3 +-- .../providers/yfinance/openbb_yfinance/utils/helpers.py | 1 - 102 files changed, 119 insertions(+), 209 deletions(-) create mode 100644 openbb_sdk/providers/alpha_vantage/__init__.py create mode 100644 openbb_sdk/providers/benzinga/__init__.py create mode 100644 openbb_sdk/providers/cboe/__init__.py create mode 100644 openbb_sdk/providers/fmp/__init__.py create mode 100644 openbb_sdk/providers/fred/__init__.py create mode 100644 openbb_sdk/providers/intrinio/__init__.py create mode 100644 openbb_sdk/providers/polygon/__init__.py create mode 100644 openbb_sdk/providers/quandl/__init__.py create mode 100644 openbb_sdk/providers/yfinance/__init__.py diff --git a/openbb_sdk/providers/alpha_vantage/__init__.py b/openbb_sdk/providers/alpha_vantage/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/openbb_sdk/providers/alpha_vantage/openbb_alpha_vantage/__init__.py b/openbb_sdk/providers/alpha_vantage/openbb_alpha_vantage/__init__.py index 1fd690f1e32..424c567cd2b 100644 --- a/openbb_sdk/providers/alpha_vantage/openbb_alpha_vantage/__init__.py +++ b/openbb_sdk/providers/alpha_vantage/openbb_alpha_vantage/__init__.py @@ -1,7 +1,6 @@ """Alpha Vantage Provider module.""" -from openbb_provider.abstract.provider import Provider - from openbb_alpha_vantage.models.stock_historical import AVStockHistoricalFetcher +from openbb_provider.abstract.provider import Provider alpha_vantage_provider = Provider( name="alpha_vantage", diff --git a/openbb_sdk/providers/benzinga/__init__.py b/openbb_sdk/providers/benzinga/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/openbb_sdk/providers/benzinga/openbb_benzinga/__init__.py b/openbb_sdk/providers/benzinga/openbb_benzinga/__init__.py index 9b43ab598da..a1046021b5a 100644 --- a/openbb_sdk/providers/benzinga/openbb_benzinga/__init__.py +++ b/openbb_sdk/providers/benzinga/openbb_benzinga/__init__.py @@ -1,8 +1,7 @@ """Benzinga provider module.""" -from openbb_provider.abstract.provider import Provider - from openbb_benzinga.models.global_news import BenzingaGlobalNewsFetcher from openbb_benzinga.models.stock_news import BenzingaStockNewsFetcher +from openbb_provider.abstract.provider import Provider benzinga_provider = Provider( name="benzinga", diff --git a/openbb_sdk/providers/benzinga/openbb_benzinga/models/global_news.py b/openbb_sdk/providers/benzinga/openbb_benzinga/models/global_news.py index 0f82b032898..be0641b4ab8 100644 --- a/openbb_sdk/providers/benzinga/openbb_benzinga/models/global_news.py +++ b/openbb_sdk/providers/benzinga/openbb_benzinga/models/global_news.py @@ -4,13 +4,12 @@ from datetime import datetime from typing import Any, Dict, List, Literal, Optional +from openbb_benzinga.utils.helpers import BenzingaStockNewsData, get_data from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.global_news import GlobalNewsQueryParams from openbb_provider.utils.helpers import get_querystring from pydantic import Field -from openbb_benzinga.utils.helpers import BenzingaStockNewsData, get_data - class BenzingaGlobalNewsQueryParams(GlobalNewsQueryParams): """Benzinga Global News query. diff --git a/openbb_sdk/providers/benzinga/openbb_benzinga/models/stock_news.py b/openbb_sdk/providers/benzinga/openbb_benzinga/models/stock_news.py index cb63ea4e7f3..4d160694fa8 100644 --- a/openbb_sdk/providers/benzinga/openbb_benzinga/models/stock_news.py +++ b/openbb_sdk/providers/benzinga/openbb_benzinga/models/stock_news.py @@ -4,13 +4,12 @@ from datetime import datetime from typing import Any, Dict, List, Literal, Optional +from openbb_benzinga.utils.helpers import BenzingaStockNewsData, get_data from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.stock_news import StockNewsQueryParams from openbb_provider.utils.helpers import get_querystring from pydantic import Field -from openbb_benzinga.utils.helpers import BenzingaStockNewsData, get_data - class BenzingaStockNewsQueryParams(StockNewsQueryParams): """Benzinga Stock News query. diff --git a/openbb_sdk/providers/cboe/__init__.py b/openbb_sdk/providers/cboe/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/openbb_sdk/providers/cboe/openbb_cboe/__init__.py b/openbb_sdk/providers/cboe/openbb_cboe/__init__.py index 7f6c94eb990..a9ea52cbaa0 100644 --- a/openbb_sdk/providers/cboe/openbb_cboe/__init__.py +++ b/openbb_sdk/providers/cboe/openbb_cboe/__init__.py @@ -1,8 +1,6 @@ """CBOE provider module.""" -from openbb_provider.abstract.provider import Provider - from openbb_cboe.models.available_indices import CboeAvailableIndicesFetcher from openbb_cboe.models.european_index_constituents import ( CboeEuropeanIndexConstituentsFetcher, @@ -20,6 +18,7 @@ from openbb_cboe.models.options_chains import CboeOptionsChainsFetcher from openbb_cboe.models.stock_historical import CboeStockHistoricalFetcher from openbb_cboe.models.stock_info import CboeStockInfoFetcher from openbb_cboe.models.stock_search import CboeStockSearchFetcher +from openbb_provider.abstract.provider import Provider cboe_provider = Provider( name="cboe", diff --git a/openbb_sdk/providers/cboe/openbb_cboe/models/available_indices.py b/openbb_sdk/providers/cboe/openbb_cboe/models/available_indices.py index 2d7c10113bc..ffd30a90811 100644 --- a/openbb_sdk/providers/cboe/openbb_cboe/models/available_indices.py +++ b/openbb_sdk/providers/cboe/openbb_cboe/models/available_indices.py @@ -3,6 +3,7 @@ from datetime import time from typing import Any, Dict, List, Optional +from openbb_cboe.utils.helpers import Europe, get_cboe_index_directory from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.available_indices import ( AvailableIndicesData, @@ -10,8 +11,6 @@ from openbb_provider.standard_models.available_indices import ( ) from pydantic import Field -from openbb_cboe.utils.helpers import Europe, get_cboe_index_directory - class CboeAvailableIndicesQueryParams(AvailableIndicesQueryParams): """CBOE Available Indices query. diff --git a/openbb_sdk/providers/cboe/openbb_cboe/models/european_index_constituents.py b/openbb_sdk/providers/cboe/openbb_cboe/models/european_index_constituents.py index 67c876c4c0b..876c4a28240 100644 --- a/openbb_sdk/providers/cboe/openbb_cboe/models/european_index_constituents.py +++ b/openbb_sdk/providers/cboe/openbb_cboe/models/european_index_constituents.py @@ -4,6 +4,7 @@ from datetime import datetime from typing import Any, Dict, List, Optional import pandas as pd +from openbb_cboe.utils.helpers import EUR_INDEX_CONSTITUENTS_COLUMNS, Europe from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.european_index_constituents import ( EuropeanIndexConstituentsData, @@ -12,8 +13,6 @@ from openbb_provider.standard_models.european_index_constituents import ( from openbb_provider.utils.helpers import make_request from pydantic import Field, validator -from openbb_cboe.utils.helpers import EUR_INDEX_CONSTITUENTS_COLUMNS, Europe - class CboeEuropeanIndexConstituentsQueryParams(EuropeanIndexConstituentsQueryParams): """CBOE Stock end of day query. diff --git a/openbb_sdk/providers/cboe/openbb_cboe/models/european_index_historical.py b/openbb_sdk/providers/cboe/openbb_cboe/models/european_index_historical.py index 38dfaeb3968..e9f322d5c86 100644 --- a/openbb_sdk/providers/cboe/openbb_cboe/models/european_index_historical.py +++ b/openbb_sdk/providers/cboe/openbb_cboe/models/european_index_historical.py @@ -4,6 +4,7 @@ from datetime import datetime from typing import Any, Dict, List, Literal, Optional import pandas as pd +from openbb_cboe.utils.helpers import Europe from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.european_index_historical import ( EuropeanIndexHistoricalData, @@ -12,8 +13,6 @@ from openbb_provider.standard_models.european_index_historical import ( from openbb_provider.utils.helpers import make_request from pydantic import Field, validator -from openbb_cboe.utils.helpers import Europe - class CboeEuropeanIndexHistoricalQueryParams(EuropeanIndexHistoricalQueryParams): """CBOE European Indices End of Day query. diff --git a/openbb_sdk/providers/cboe/openbb_cboe/models/futures_curve.py b/openbb_sdk/providers/cboe/openbb_cboe/models/futures_curve.py index dcbecf4e67d..387de94ac00 100644 --- a/openbb_sdk/providers/cboe/openbb_cboe/models/futures_curve.py +++ b/openbb_sdk/providers/cboe/openbb_cboe/models/futures_curve.py @@ -4,6 +4,7 @@ from typing import Any, Dict, List, Optional import pandas as pd +from openbb_cboe.utils.helpers import get_settlement_prices from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.futures_curve import ( FuturesCurveData, @@ -11,8 +12,6 @@ from openbb_provider.standard_models.futures_curve import ( ) from pydantic import Field -from openbb_cboe.utils.helpers import get_settlement_prices - class CboeFuturesCurveQueryParams(FuturesCurveQueryParams): """CBOE Futures Curve Query. diff --git a/openbb_sdk/providers/cboe/openbb_cboe/models/index_search.py b/openbb_sdk/providers/cboe/openbb_cboe/models/index_search.py index bf3545b7720..4cd1761f819 100644 --- a/openbb_sdk/providers/cboe/openbb_cboe/models/index_search.py +++ b/openbb_sdk/providers/cboe/openbb_cboe/models/index_search.py @@ -4,6 +4,7 @@ from datetime import time from typing import Any, Dict, List, Optional import pandas as pd +from openbb_cboe.utils.helpers import Europe, get_cboe_index_directory from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.index_search import ( IndexSearchData, @@ -11,8 +12,6 @@ from openbb_provider.standard_models.index_search import ( ) from pydantic import Field -from openbb_cboe.utils.helpers import Europe, get_cboe_index_directory - class CboeIndexSearchQueryParams(IndexSearchQueryParams): """CBOE Index Search query. Search the CBOE company directory by name or ticker. diff --git a/openbb_sdk/providers/cboe/openbb_cboe/models/index_snapshots.py b/openbb_sdk/providers/cboe/openbb_cboe/models/index_snapshots.py index defd3f13f55..182fc464b84 100644 --- a/openbb_sdk/providers/cboe/openbb_cboe/models/index_snapshots.py +++ b/openbb_sdk/providers/cboe/openbb_cboe/models/index_snapshots.py @@ -4,14 +4,6 @@ from datetime import datetime from typing import Any, Dict, List, Optional import pandas as pd -from openbb_provider.abstract.fetcher import Fetcher -from openbb_provider.standard_models.index_snapshots import ( - IndexSnapshotsData, - IndexSnapshotsQueryParams, -) -from openbb_provider.utils.helpers import make_request -from pydantic import Field - from openbb_cboe.utils.helpers import ( EUR_INDEX_COLUMNS, US_INDEX_COLUMNS, @@ -19,6 +11,13 @@ from openbb_cboe.utils.helpers import ( get_cboe_directory, get_cboe_index_directory, ) +from openbb_provider.abstract.fetcher import Fetcher +from openbb_provider.standard_models.index_snapshots import ( + IndexSnapshotsData, + IndexSnapshotsQueryParams, +) +from openbb_provider.utils.helpers import make_request +from pydantic import Field class CboeIndexSnapshotsQueryParams(IndexSnapshotsQueryParams): diff --git a/openbb_sdk/providers/cboe/openbb_cboe/models/major_indices_historical.py b/openbb_sdk/providers/cboe/openbb_cboe/models/major_indices_historical.py index 4825a0f12a8..0256e0d5eda 100644 --- a/openbb_sdk/providers/cboe/openbb_cboe/models/major_indices_historical.py +++ b/openbb_sdk/providers/cboe/openbb_cboe/models/major_indices_historical.py @@ -4,6 +4,11 @@ from datetime import datetime, timedelta from typing import Any, Dict, List, Literal, Optional import pandas as pd +from openbb_cboe.utils.helpers import ( + TICKER_EXCEPTIONS, + get_cboe_index_directory, + get_ticker_info, +) from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.major_indices_historical import ( MajorIndicesHistoricalData, @@ -12,12 +17,6 @@ from openbb_provider.standard_models.major_indices_historical import ( from openbb_provider.utils.helpers import make_request from pydantic import Field, validator -from openbb_cboe.utils.helpers import ( - TICKER_EXCEPTIONS, - get_cboe_index_directory, - get_ticker_info, -) - class CboeMajorIndicesHistoricalQueryParams(MajorIndicesHistoricalQueryParams): """CBOE Stock end of day query. diff --git a/openbb_sdk/providers/cboe/openbb_cboe/models/options_chains.py b/openbb_sdk/providers/cboe/openbb_cboe/models/options_chains.py index 25f7929a576..10506c0694b 100644 --- a/openbb_sdk/providers/cboe/openbb_cboe/models/options_chains.py +++ b/openbb_sdk/providers/cboe/openbb_cboe/models/options_chains.py @@ -5,6 +5,11 @@ from datetime import datetime from typing import Any, Dict, List, Optional import pandas as pd +from openbb_cboe.utils.helpers import ( + TICKER_EXCEPTIONS, + get_cboe_directory, + get_cboe_index_directory, +) from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.options_chains import ( OptionsChainsData, @@ -13,12 +18,6 @@ from openbb_provider.standard_models.options_chains import ( from openbb_provider.utils.helpers import make_request from pydantic import Field, validator -from openbb_cboe.utils.helpers import ( - TICKER_EXCEPTIONS, - get_cboe_directory, - get_cboe_index_directory, -) - class CboeOptionsChainsQueryParams(OptionsChainsQueryParams): """Get the complete options chains for a ticker from CBOE. diff --git a/openbb_sdk/providers/cboe/openbb_cboe/models/stock_historical.py b/openbb_sdk/providers/cboe/openbb_cboe/models/stock_historical.py index 8a34349d736..82ea36c226d 100644 --- a/openbb_sdk/providers/cboe/openbb_cboe/models/stock_historical.py +++ b/openbb_sdk/providers/cboe/openbb_cboe/models/stock_historical.py @@ -4,6 +4,12 @@ from datetime import datetime, timedelta from typing import Any, Dict, List, Literal, Optional import pandas as pd +from openbb_cboe.utils.helpers import ( + TICKER_EXCEPTIONS, + get_cboe_directory, + get_cboe_index_directory, + get_ticker_info, +) from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.stock_historical import ( StockHistoricalData, @@ -12,13 +18,6 @@ from openbb_provider.standard_models.stock_historical import ( from openbb_provider.utils.helpers import make_request from pydantic import Field, validator -from openbb_cboe.utils.helpers import ( - TICKER_EXCEPTIONS, - get_cboe_directory, - get_cboe_index_directory, - get_ticker_info, -) - class CboeStockHistoricalQueryParams(StockHistoricalQueryParams): """CBOE Stock end of day query. diff --git a/openbb_sdk/providers/cboe/openbb_cboe/models/stock_info.py b/openbb_sdk/providers/cboe/openbb_cboe/models/stock_info.py index 7778e9a9792..fddaa3e379f 100644 --- a/openbb_sdk/providers/cboe/openbb_cboe/models/stock_info.py +++ b/openbb_sdk/providers/cboe/openbb_cboe/models/stock_info.py @@ -5,19 +5,18 @@ from datetime import datetime from typing import Any, Dict, List, Optional import pandas as pd -from openbb_provider.abstract.fetcher import Fetcher -from openbb_provider.standard_models.stock_info import ( - StockInfoData, - StockInfoQueryParams, -) -from pydantic import Field - from openbb_cboe.utils.helpers import ( get_cboe_directory, get_cboe_index_directory, get_ticker_info, get_ticker_iv, ) +from openbb_provider.abstract.fetcher import Fetcher +from openbb_provider.standard_models.stock_info import ( + StockInfoData, + StockInfoQueryParams, +) +from pydantic import Field class CboeStockInfoQueryParams(StockInfoQueryParams): diff --git a/openbb_sdk/providers/cboe/openbb_cboe/models/stock_search.py b/openbb_sdk/providers/cboe/openbb_cboe/models/stock_search.py index 8e23abfce53..e44c1a9b54c 100644 --- a/openbb_sdk/providers/cboe/openbb_cboe/models/stock_search.py +++ b/openbb_sdk/providers/cboe/openbb_cboe/models/stock_search.py @@ -3,6 +3,7 @@ from typing import Any, Dict, List, Optional +from openbb_cboe.utils.helpers import get_cboe_directory from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.stock_search import ( StockSearchData, @@ -10,8 +11,6 @@ from openbb_provider.standard_models.stock_search import ( ) from pydantic import Field -from openbb_cboe.utils.helpers import get_cboe_directory - class CboeStockSearchQueryParams(StockSearchQueryParams): """CBOE Company Search query. diff --git a/openbb_sdk/providers/fmp/__init__.py b/openbb_sdk/providers/fmp/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/openbb_sdk/providers/fmp/openbb_fmp/__init__.py b/openbb_sdk/providers/fmp/openbb_fmp/__init__.py index deab8f902b4..2cb747b3c4f 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/__init__.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/__init__.py @@ -1,6 +1,4 @@ """FMP Provider module.""" -from openbb_provider.abstract.provider import Provider - from openbb_fmp.models.analyst_estimates import FMPAnalystEstimatesFetcher from openbb_fmp.models.available_indices import FMPAvailableIndicesFetcher from openbb_fmp.models.balance_sheet import FMPBalanceSheetFetcher @@ -45,6 +43,7 @@ from openbb_fmp.models.stock_peers import FMPStockPeersFetcher from openbb_fmp.models.stock_quote import FMPStockQuoteFetcher from openbb_fmp.models.stock_splits import FMPStockSplitCalendarFetcher from openbb_fmp.models.treasury_rates import FMPTreasuryRatesFetcher +from openbb_provider.abstract.provider import Provider fmp_provider = Provider( name="fmp", diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/analyst_estimates.py b/openbb_sdk/providers/fmp/openbb_fmp/models/analyst_estimates.py index 9228593342e..3c911b78902 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/analyst_estimates.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/analyst_estimates.py @@ -3,14 +3,13 @@ from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.analyst_estimates import ( AnalystEstimatesData, AnalystEstimatesQueryParams, ) -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPAnalystEstimatesQueryParams(AnalystEstimatesQueryParams): """FMP Analysts Estimates Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/available_indices.py b/openbb_sdk/providers/fmp/openbb_fmp/models/available_indices.py index b8cc90e9afd..2f8d307822c 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/available_indices.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/available_indices.py @@ -3,6 +3,7 @@ from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.available_indices import ( AvailableIndicesData, @@ -10,8 +11,6 @@ from openbb_provider.standard_models.available_indices import ( ) from pydantic import Field -from openbb_fmp.utils.helpers import get_data_many - class FMPAvailableIndicesQueryParams(AvailableIndicesQueryParams): """FMP Available Indices Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/balance_sheet.py b/openbb_sdk/providers/fmp/openbb_fmp/models/balance_sheet.py index 5ca1409a3cc..3c273a94c8e 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/balance_sheet.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/balance_sheet.py @@ -7,6 +7,7 @@ from datetime import ( ) from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.balance_sheet import ( BalanceSheetData, @@ -14,8 +15,6 @@ from openbb_provider.standard_models.balance_sheet import ( ) from pydantic import Field, validator -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPBalanceSheetQueryParams(BalanceSheetQueryParams): """FMP Balance Sheet QueryParams. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/balance_sheet_growth.py b/openbb_sdk/providers/fmp/openbb_fmp/models/balance_sheet_growth.py index 3f4edd3cde5..6c45fd8a4a2 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/balance_sheet_growth.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/balance_sheet_growth.py @@ -4,6 +4,7 @@ from datetime import datetime from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.balance_sheet_growth import ( BalanceSheetGrowthData, @@ -11,8 +12,6 @@ from openbb_provider.standard_models.balance_sheet_growth import ( ) from pydantic import validator -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPBalanceSheetGrowthQueryParams(BalanceSheetGrowthQueryParams): """FMP Balance Sheet Growth QueryParams. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/cash_flow.py b/openbb_sdk/providers/fmp/openbb_fmp/models/cash_flow.py index 8b309aeb91f..76284bab75c 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/cash_flow.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/cash_flow.py @@ -7,6 +7,7 @@ from datetime import ( ) from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.cash_flow import ( CashFlowStatementData, @@ -14,8 +15,6 @@ from openbb_provider.standard_models.cash_flow import ( ) from pydantic import Field, validator -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPCashFlowStatementQueryParams(CashFlowStatementQueryParams): """FMP Cash Flow Statement Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/cash_flow_growth.py b/openbb_sdk/providers/fmp/openbb_fmp/models/cash_flow_growth.py index a684304eb74..db97b059472 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/cash_flow_growth.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/cash_flow_growth.py @@ -4,6 +4,7 @@ from datetime import datetime from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.cash_flow_growth import ( CashFlowStatementGrowthData, @@ -11,8 +12,6 @@ from openbb_provider.standard_models.cash_flow_growth import ( ) from pydantic import validator -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPCashFlowStatementGrowthQueryParams(CashFlowStatementGrowthQueryParams): """FMP Cash Flow Statement Growth QueryParams. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/company_overview.py b/openbb_sdk/providers/fmp/openbb_fmp/models/company_overview.py index 5a473f68444..d8c766b19af 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/company_overview.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/company_overview.py @@ -3,14 +3,13 @@ from typing import Any, Dict, Optional +from openbb_fmp.utils.helpers import get_data_one from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.company_overview import ( CompanyOverviewData, CompanyOverviewQueryParams, ) -from openbb_fmp.utils.helpers import get_data_one - # This part is only provided by FMP and not by the other providers for now. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/crypto_historical.py b/openbb_sdk/providers/fmp/openbb_fmp/models/crypto_historical.py index 9662c743e75..7f86c90631a 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/crypto_historical.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/crypto_historical.py @@ -5,6 +5,7 @@ from datetime import datetime from typing import Any, Dict, List, Optional from dateutil.relativedelta import relativedelta +from openbb_fmp.utils.helpers import get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.crypto_historical import ( CryptoHistoricalData, @@ -13,8 +14,6 @@ from openbb_provider.standard_models.crypto_historical import ( from openbb_provider.utils.helpers import get_querystring from pydantic import Field, NonNegativeInt, validator -from openbb_fmp.utils.helpers import get_data_many - class FMPCryptoHistoricalQueryParams(CryptoHistoricalQueryParams): # noqa: E501 diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/dividend_calendar.py b/openbb_sdk/providers/fmp/openbb_fmp/models/dividend_calendar.py index eeb20e84864..d95f470159c 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/dividend_calendar.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/dividend_calendar.py @@ -5,6 +5,7 @@ from datetime import datetime from typing import Any, Dict, List, Optional from dateutil.relativedelta import relativedelta +from openbb_fmp.utils.helpers import get_data_many, get_querystring from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.dividend_calendar import ( DividendCalendarData, @@ -12,8 +13,6 @@ from openbb_provider.standard_models.dividend_calendar import ( ) from pydantic import validator -from openbb_fmp.utils.helpers import get_data_many, get_querystring - class FMPDividendCalendarQueryParams(DividendCalendarQueryParams): """FMP Dividend Calendar Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/earnings_calendar.py b/openbb_sdk/providers/fmp/openbb_fmp/models/earnings_calendar.py index 21c504949bf..e30bae3a328 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/earnings_calendar.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/earnings_calendar.py @@ -4,6 +4,7 @@ from datetime import datetime from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.earnings_calendar import ( EarningsCalendarData, @@ -11,8 +12,6 @@ from openbb_provider.standard_models.earnings_calendar import ( ) from pydantic import validator -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPEarningsCalendarQueryParams(EarningsCalendarQueryParams): """FMP Earnings Calendar Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/earnings_call_transcript.py b/openbb_sdk/providers/fmp/openbb_fmp/models/earnings_call_transcript.py index 18047268dbc..3679dff4665 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/earnings_call_transcript.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/earnings_call_transcript.py @@ -4,6 +4,7 @@ from datetime import datetime from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.earnings_call_transcript import ( EarningsCallTranscriptData, @@ -11,8 +12,6 @@ from openbb_provider.standard_models.earnings_call_transcript import ( ) from pydantic import validator -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPEarningsCallTranscriptQueryParams(EarningsCallTranscriptQueryParams): """FMP Earnings Calendar Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/executive_compensation.py b/openbb_sdk/providers/fmp/openbb_fmp/models/executive_compensation.py index 878803db095..dcada60edd9 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/executive_compensation.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/executive_compensation.py @@ -4,6 +4,7 @@ from datetime import datetime from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.executive_compensation import ( ExecutiveCompensationData, @@ -11,8 +12,6 @@ from openbb_provider.standard_models.executive_compensation import ( ) from pydantic import validator -from openbb_fmp.utils.helpers import create_url, get_data_many - # This endpoint is only provided by FMP and not by the other providers for now. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/financial_ratios.py b/openbb_sdk/providers/fmp/openbb_fmp/models/financial_ratios.py index 88bdc807b4a..83590218e67 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/financial_ratios.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/financial_ratios.py @@ -5,12 +5,11 @@ from concurrent.futures import ThreadPoolExecutor from itertools import repeat from typing import Any, Dict, List, Literal, Optional +from openbb_fmp.utils.helpers import get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.base import FinancialStatementQueryParams from openbb_provider.standard_models.financial_ratios import FinancialRatiosData -from openbb_fmp.utils.helpers import get_data_many - PeriodType = Literal["annual", "quarter"] diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/forex_historical.py b/openbb_sdk/providers/fmp/openbb_fmp/models/forex_historical.py index dc9224b944c..4375fa15dfb 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/forex_historical.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/forex_historical.py @@ -5,6 +5,7 @@ from datetime import datetime from typing import Any, Dict, List, Optional from dateutil.relativedelta import relativedelta +from openbb_fmp.utils.helpers import get_data_many, get_querystring from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.forex_historical import ( ForexHistoricalData, @@ -12,8 +13,6 @@ from openbb_provider.standard_models.forex_historical import ( ) from pydantic import Field, validator -from openbb_fmp.utils.helpers import get_data_many, get_querystring - class FMPForexHistoricalQueryParams(ForexHistoricalQueryParams): """FMP Forex end of day Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/forex_pairs.py b/openbb_sdk/providers/fmp/openbb_fmp/models/forex_pairs.py index 40fa6bfa328..a57e8904d32 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/forex_pairs.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/forex_pairs.py @@ -3,6 +3,7 @@ from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.forex_pairs import ( ForexPairsData, @@ -10,8 +11,6 @@ from openbb_provider.standard_models.forex_pairs import ( ) from pydantic import Field -from openbb_fmp.utils.helpers import get_data_many - class FMPForexPairsQueryParams(ForexPairsQueryParams): """FMP Forex available pairs Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/global_news.py b/openbb_sdk/providers/fmp/openbb_fmp/models/global_news.py index 054ff82dc2c..f3ab508fb97 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/global_news.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/global_news.py @@ -2,6 +2,7 @@ from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.global_news import ( GlobalNewsData, @@ -9,8 +10,6 @@ from openbb_provider.standard_models.global_news import ( ) from pydantic import Field -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPGlobalNewsQueryParams(GlobalNewsQueryParams): """FMP Global News query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/historical_dividends.py b/openbb_sdk/providers/fmp/openbb_fmp/models/historical_dividends.py index f988f9b4f1b..a18f9060322 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/historical_dividends.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/historical_dividends.py @@ -2,14 +2,13 @@ from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.historical_dividends import ( HistoricalDividendsData, HistoricalDividendsQueryParams, ) -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPHistoricalDividendsQueryParams(HistoricalDividendsQueryParams): """FMP Historical Dividends query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/historical_employees.py b/openbb_sdk/providers/fmp/openbb_fmp/models/historical_employees.py index 4a4642b2ca2..b54ffba73fd 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/historical_employees.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/historical_employees.py @@ -3,14 +3,13 @@ from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.historical_employees import ( HistoricalEmployeesData, HistoricalEmployeesQueryParams, ) -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPHistoricalEmployeesQueryParams(HistoricalEmployeesQueryParams): """FMP Historical Employees query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/historical_stock_splits.py b/openbb_sdk/providers/fmp/openbb_fmp/models/historical_stock_splits.py index 4024f021455..a8bb4c126eb 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/historical_stock_splits.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/historical_stock_splits.py @@ -4,6 +4,7 @@ from datetime import datetime from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.historical_stock_splits import ( HistoricalStockSplitsData, @@ -11,8 +12,6 @@ from openbb_provider.standard_models.historical_stock_splits import ( ) from pydantic import validator -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPHistoricalStockSplitsQueryParams(HistoricalStockSplitsQueryParams): """FMP Historical Stock Splits Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/income_statement.py b/openbb_sdk/providers/fmp/openbb_fmp/models/income_statement.py index 26e21639f97..1833fb55a0c 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/income_statement.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/income_statement.py @@ -7,6 +7,7 @@ from datetime import ( ) from typing import Any, Dict, List, Literal, Optional +from openbb_fmp.utils.helpers import get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.income_statement import ( IncomeStatementData, @@ -14,8 +15,6 @@ from openbb_provider.standard_models.income_statement import ( ) from pydantic import Field, root_validator -from openbb_fmp.utils.helpers import get_data_many - PeriodType = Literal["annual", "quarter"] diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/income_statement_growth.py b/openbb_sdk/providers/fmp/openbb_fmp/models/income_statement_growth.py index b37cc6ee510..5a8d1f9abd7 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/income_statement_growth.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/income_statement_growth.py @@ -4,6 +4,7 @@ from datetime import datetime from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.income_statement_growth import ( IncomeStatementGrowthData, @@ -11,8 +12,6 @@ from openbb_provider.standard_models.income_statement_growth import ( ) from pydantic import validator -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPIncomeStatementGrowthQueryParams(IncomeStatementGrowthQueryParams): """FMP Income Statement Growth QueryParams. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/institutional_ownership.py b/openbb_sdk/providers/fmp/openbb_fmp/models/institutional_ownership.py index bef9e77b910..1fc4d046baf 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/institutional_ownership.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/institutional_ownership.py @@ -4,6 +4,7 @@ from datetime import datetime from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.institutional_ownership import ( InstitutionalOwnershipData, @@ -11,8 +12,6 @@ from openbb_provider.standard_models.institutional_ownership import ( ) from pydantic import validator -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPInstitutionalOwnershipQueryParams(InstitutionalOwnershipQueryParams): """FMP Institutional Ownership Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/key_executives.py b/openbb_sdk/providers/fmp/openbb_fmp/models/key_executives.py index bbc0a104e2c..8f5a00a4a2b 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/key_executives.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/key_executives.py @@ -4,6 +4,7 @@ from datetime import datetime from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.key_executives import ( KeyExecutivesData, @@ -11,8 +12,6 @@ from openbb_provider.standard_models.key_executives import ( ) from pydantic import validator -from openbb_fmp.utils.helpers import get_data_many - class FMPKeyExecutivesQueryParams(KeyExecutivesQueryParams): """FMP Key Executives QueryParams. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/key_metrics.py b/openbb_sdk/providers/fmp/openbb_fmp/models/key_metrics.py index 2d691b7fbf1..1057436a3c8 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/key_metrics.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/key_metrics.py @@ -5,14 +5,13 @@ from concurrent.futures import ThreadPoolExecutor from itertools import repeat from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.key_metrics import ( KeyMetricsData, KeyMetricsQueryParams, ) -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPKeyMetricsQueryParams(KeyMetricsQueryParams): """FMP Key Metrics Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/major_indices_constituents.py b/openbb_sdk/providers/fmp/openbb_fmp/models/major_indices_constituents.py index cf91ba5920b..103a47bab8d 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/major_indices_constituents.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/major_indices_constituents.py @@ -4,6 +4,7 @@ from datetime import datetime from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.major_indices_constituents import ( MajorIndicesConstituentsData, @@ -11,8 +12,6 @@ from openbb_provider.standard_models.major_indices_constituents import ( ) from pydantic import validator -from openbb_fmp.utils.helpers import get_data_many - class FMPMajorIndicesConstituentsQueryParams(MajorIndicesConstituentsQueryParams): """FMP Major Indices Constituents query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/major_indices_historical.py b/openbb_sdk/providers/fmp/openbb_fmp/models/major_indices_historical.py index 0042cf65a1d..f3b5de74016 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/major_indices_historical.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/major_indices_historical.py @@ -4,6 +4,7 @@ from datetime import datetime from typing import Any, Dict, List, Literal, Optional +from openbb_fmp.utils.helpers import get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.major_indices_historical import ( MajorIndicesHistoricalData, @@ -12,8 +13,6 @@ from openbb_provider.standard_models.major_indices_historical import ( from openbb_provider.utils.helpers import get_querystring from pydantic import Field, NonNegativeInt, validator -from openbb_fmp.utils.helpers import get_data_many - class FMPMajorIndicesHistoricalQueryParams(MajorIndicesHistoricalQueryParams): """FMP Major Indices end of day Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/price_target.py b/openbb_sdk/providers/fmp/openbb_fmp/models/price_target.py index a33e46440fe..5ded313a070 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/price_target.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/price_target.py @@ -3,6 +3,7 @@ from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.price_target import ( PriceTargetData, @@ -10,8 +11,6 @@ from openbb_provider.standard_models.price_target import ( ) from pydantic import Field -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPPriceTargetQueryParams(PriceTargetQueryParams): """FMP Price Target Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/price_target_consensus.py b/openbb_sdk/providers/fmp/openbb_fmp/models/price_target_consensus.py index 48ce181c75b..3eb3b6a0948 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/price_target_consensus.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/price_target_consensus.py @@ -3,14 +3,13 @@ from typing import Any, Dict, Optional +from openbb_fmp.utils.helpers import create_url, get_data_one from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.price_target_consensus import ( PriceTargetConsensusData, PriceTargetConsensusQueryParams, ) -from openbb_fmp.utils.helpers import create_url, get_data_one - class FMPPriceTargetConsensusQueryParams(PriceTargetConsensusQueryParams): """FMP Price Target Consensus Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/revenue_business_line.py b/openbb_sdk/providers/fmp/openbb_fmp/models/revenue_business_line.py index b936a49861c..1713507832a 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/revenue_business_line.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/revenue_business_line.py @@ -4,6 +4,7 @@ from datetime import datetime from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.revenue_business_line import ( RevenueBusinessLineData, @@ -11,8 +12,6 @@ from openbb_provider.standard_models.revenue_business_line import ( ) from pydantic import validator -from openbb_fmp.utils.helpers import create_url, get_data - class FMPRevenueBusinessLineQueryParams(RevenueBusinessLineQueryParams): """FMP Revenue Business Line Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/revenue_geographic.py b/openbb_sdk/providers/fmp/openbb_fmp/models/revenue_geographic.py index f5a78ee2490..017d465a554 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/revenue_geographic.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/revenue_geographic.py @@ -4,6 +4,7 @@ from datetime import datetime from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.revenue_geographic import ( RevenueGeographicData, @@ -11,8 +12,6 @@ from openbb_provider.standard_models.revenue_geographic import ( ) from pydantic import validator -from openbb_fmp.utils.helpers import create_url, get_data - class FMPRevenueGeographicQueryParams(RevenueGeographicQueryParams): """FMP Revenue Geographic QueryParams. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/risk_premium.py b/openbb_sdk/providers/fmp/openbb_fmp/models/risk_premium.py index fecc2e37420..c3c6811ffdd 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/risk_premium.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/risk_premium.py @@ -3,14 +3,13 @@ from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.risk_premium import ( RiskPremiumData, RiskPremiumQueryParams, ) -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPRiskPremiumQueryParams(RiskPremiumQueryParams): """FMP Risk Premium query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/sec_filings.py b/openbb_sdk/providers/fmp/openbb_fmp/models/sec_filings.py index ad13be51da6..5ba89bcb65e 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/sec_filings.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/sec_filings.py @@ -3,14 +3,13 @@ from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.sec_filings import ( SECFilingsData, SECFilingsQueryParams, ) -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPSECFilingsQueryParams(SECFilingsQueryParams): """FMP SEC Filings Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/share_statistics.py b/openbb_sdk/providers/fmp/openbb_fmp/models/share_statistics.py index c0f1f75727a..868a0611c6d 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/share_statistics.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/share_statistics.py @@ -7,6 +7,7 @@ from datetime import ( ) from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.share_statistics import ( ShareStatisticsData, @@ -14,8 +15,6 @@ from openbb_provider.standard_models.share_statistics import ( ) from pydantic import validator -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPShareStatisticsQueryParams(ShareStatisticsQueryParams): """FMP Income Statement QueryParams. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/stock_historical.py b/openbb_sdk/providers/fmp/openbb_fmp/models/stock_historical.py index 685080e8c8c..fff420ec86b 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/stock_historical.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/stock_historical.py @@ -4,6 +4,7 @@ from datetime import datetime from typing import Any, Dict, List, Literal, Optional from dateutil.relativedelta import relativedelta +from openbb_fmp.utils.helpers import get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.stock_historical import ( StockHistoricalData, @@ -12,8 +13,6 @@ from openbb_provider.standard_models.stock_historical import ( from openbb_provider.utils.helpers import get_querystring from pydantic import Field, NonNegativeInt, validator -from openbb_fmp.utils.helpers import get_data_many - class FMPStockHistoricalQueryParams(StockHistoricalQueryParams): """FMP Stock end of day Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/stock_insider_trading.py b/openbb_sdk/providers/fmp/openbb_fmp/models/stock_insider_trading.py index 41201f9aed9..50e9463fa01 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/stock_insider_trading.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/stock_insider_trading.py @@ -3,14 +3,13 @@ from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.stock_insider_trading import ( StockInsiderTradingData, StockInsiderTradingQueryParams, ) -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPStockInsiderTradingQueryParams(StockInsiderTradingQueryParams): """FMP Stock Insider Trading Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/stock_multiples.py b/openbb_sdk/providers/fmp/openbb_fmp/models/stock_multiples.py index 84edc3a336f..2cc70215bab 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/stock_multiples.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/stock_multiples.py @@ -3,14 +3,13 @@ from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.stock_multiples import ( StockMultiplesData, StockMultiplesQueryParams, ) -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPStockMultiplesQueryParams(StockMultiplesQueryParams): """FMP Stock Multiples Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/stock_news.py b/openbb_sdk/providers/fmp/openbb_fmp/models/stock_news.py index a44c9a05ade..1b251cfa9c3 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/stock_news.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/stock_news.py @@ -3,6 +3,7 @@ from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.stock_news import ( StockNewsData, @@ -10,8 +11,6 @@ from openbb_provider.standard_models.stock_news import ( ) from pydantic import Field -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPStockNewsQueryParams(StockNewsQueryParams): """FMP Stock News query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/stock_ownership.py b/openbb_sdk/providers/fmp/openbb_fmp/models/stock_ownership.py index eb0b4a0368d..9e6e8d22e8d 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/stock_ownership.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/stock_ownership.py @@ -3,14 +3,13 @@ from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.stock_ownership import ( StockOwnershipData, StockOwnershipQueryParams, ) -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPStockOwnershipQueryParams(StockOwnershipQueryParams): """FMP Stock Ownership query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/stock_peers.py b/openbb_sdk/providers/fmp/openbb_fmp/models/stock_peers.py index 7f655f62548..8cd6cfd8a59 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/stock_peers.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/stock_peers.py @@ -3,14 +3,13 @@ from typing import Any, Dict, Optional +from openbb_fmp.utils.helpers import create_url, get_data_one from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.stock_peers import ( StockPeersData, StockPeersQueryParams, ) -from openbb_fmp.utils.helpers import create_url, get_data_one - # FMP SPECIFIC FUNCTIONALITY CURRENTLY diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/stock_quote.py b/openbb_sdk/providers/fmp/openbb_fmp/models/stock_quote.py index 7f51022c646..33b3f33fd0c 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/stock_quote.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/stock_quote.py @@ -4,6 +4,7 @@ from datetime import datetime from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import get_data_many, get_querystring from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.stock_quote import ( StockQuoteData, @@ -11,8 +12,6 @@ from openbb_provider.standard_models.stock_quote import ( ) from pydantic import Field, validator -from openbb_fmp.utils.helpers import get_data_many, get_querystring - class FMPStockQuoteQueryParams(StockQuoteQueryParams): """FMP Stock end of day Query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/stock_splits.py b/openbb_sdk/providers/fmp/openbb_fmp/models/stock_splits.py index a518c73bc34..5bf55f9a25d 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/stock_splits.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/stock_splits.py @@ -5,14 +5,13 @@ from datetime import date from typing import Any, Dict, List, Optional from dateutil.relativedelta import relativedelta +from openbb_fmp.utils.helpers import create_url, get_data_many from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.stock_splits import ( StockSplitCalendarData, StockSplitCalendarQueryParams, ) -from openbb_fmp.utils.helpers import create_url, get_data_many - class FMPStockSplitCalendarQueryParams(StockSplitCalendarQueryParams): """FMP Stock Split Calendar query. diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/treasury_rates.py b/openbb_sdk/providers/fmp/openbb_fmp/models/treasury_rates.py index 929d70fd8ff..fb7ca914a2c 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/treasury_rates.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/treasury_rates.py @@ -4,6 +4,7 @@ from datetime import datetime, timedelta from typing import Any, Dict, List, Optional +from openbb_fmp.utils.helpers import get_data_many, get_querystring from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.treasury_rates import ( TreasuryRatesData, @@ -11,8 +12,6 @@ from openbb_provider.standard_models.treasury_rates import ( ) from pydantic import validator -from openbb_fmp.utils.helpers import get_data_many, get_querystring - class FMPTreasuryRatesQueryParams(TreasuryRatesQueryParams): """FMP Stock News Query. diff --git a/openbb_sdk/providers/fred/__init__.py b/openbb_sdk/providers/fred/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/openbb_sdk/providers/fred/openbb_fred/__init__.py b/openbb_sdk/providers/fred/openbb_fred/__init__.py index 3564cb0c205..7fb8575741b 100644 --- a/openbb_sdk/providers/fred/openbb_fred/__init__.py +++ b/openbb_sdk/providers/fred/openbb_fred/__init__.py @@ -1,6 +1,4 @@ """FRED provider module.""" -from openbb_provider.abstract.provider import Provider - from openbb_fred.models.ameribor_rates import FREDAMERIBORFetcher from openbb_fred.models.cpi import FREDCPIFetcher from openbb_fred.models.estr_rates import FREDESTRFetcher @@ -10,6 +8,7 @@ from openbb_fred.models.iorb_rates import FREDIORBFetcher from openbb_fred.models.sofr_rates import FREDSOFRFetcher from openbb_fred.models.sonia_rates import FREDSONIAFetcher from openbb_fred.models.us_yield_curve import FREDYieldCurveFetcher +from openbb_provider.abstract.provider import Provider fred_provider = Provider( name="fred", diff --git a/openbb_sdk/providers/intrinio/__init__.py b/openbb_sdk/providers/intrinio/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/openbb_sdk/providers/intrinio/openbb_intrinio/__init__.py b/openbb_sdk/providers/intrinio/openbb_intrinio/__init__.py index 46665ba868f..78c9a9c453e 100644 --- a/openbb_sdk/providers/intrinio/openbb_intrinio/__init__.py +++ b/openbb_sdk/providers/intrinio/openbb_intrinio/__init__.py @@ -1,8 +1,6 @@ """intrinio provider module.""" -from openbb_provider.abstract.provider import Provider - from openbb_intrinio.models.balance_sheet import IntrinioBalanceSheetFetcher from openbb_intrinio.models.cash_flow import IntrinioCashFlowStatementFetcher from openbb_intrinio.models.forex_pairs import IntrinioForexPairsFetcher @@ -12,6 +10,7 @@ from openbb_intrinio.models.options_chains import IntrinioOptionsChainsFetcher from openbb_intrinio.models.stock_historical import IntrinioStockHistoricalFetcher from openbb_intrinio.models.stock_news import IntrinioStockNewsFetcher from openbb_intrinio.models.stock_quote import IntrinioStockQuoteFetcher +from openbb_provider.abstract.provider import Provider intrinio_provider = Provider( name="intrinio", diff --git a/openbb_sdk/providers/intrinio/openbb_intrinio/models/balance_sheet.py b/openbb_sdk/providers/intrinio/openbb_intrinio/models/balance_sheet.py index e25582d2f0a..dd5e46d527b 100644 --- a/openbb_sdk/providers/intrinio/openbb_intrinio/models/balance_sheet.py +++ b/openbb_sdk/providers/intrinio/openbb_intrinio/models/balance_sheet.py @@ -4,6 +4,7 @@ from datetime import date from typing import Any, Dict, List, Literal, Optional +from openbb_intrinio.utils.helpers import get_data_one from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.balance_sheet import ( BalanceSheetData, @@ -11,8 +12,6 @@ from openbb_provider.standard_models.balance_sheet import ( ) from pydantic import Field -from openbb_intrinio.utils.helpers import get_data_one - class IntrinioBalanceSheetQueryParams(BalanceSheetQ