Merge branch 'develop' into feature/check_comma_string

This commit is contained in:
montezdesousa
2024-02-12 10:47:14 +00:00
committed by GitHub
9 changed files with 219 additions and 114 deletions

View File

@@ -12,57 +12,58 @@ from openbb_core.provider.utils.descriptions import (
QUERY_DESCRIPTIONS,
)
SERIES_NAMES = Literal[
"shiller_pe_month",
"shiller_pe_year",
"pe_year",
"pe_month",
"dividend_year",
"dividend_month",
"dividend_growth_quarter",
"dividend_growth_year",
"dividend_yield_year",
"dividend_yield_month",
"earnings_year",
"earnings_month",
"earnings_growth_year",
"earnings_growth_quarter",
"real_earnings_growth_year",
"real_earnings_growth_quarter",
"earnings_yield_year",
"earnings_yield_month",
"real_price_year",
"real_price_month",
"inflation_adjusted_price_year",
"inflation_adjusted_price_month",
"sales_year",
"sales_quarter",
"sales_growth_year",
"sales_growth_quarter",
"real_sales_year",
"real_sales_quarter",
"real_sales_growth_year",
"real_sales_growth_quarter",
"price_to_sales_year",
"price_to_sales_quarter",
"price_to_book_value_year",
"price_to_book_value_quarter",
"book_value_year",
"book_value_quarter",
]
class SP500MultiplesQueryParams(QueryParams):
"""SP500 Multiples Query."""
series_name: Literal[
"Shiller PE Ratio by Month",
"Shiller PE Ratio by Year",
"PE Ratio by Year",
"PE Ratio by Month",
"Dividend by Year",
"Dividend by Month",
"Dividend Growth by Quarter",
"Dividend Growth by Year",
"Dividend Yield by Year",
"Dividend Yield by Month",
"Earnings by Year",
"Earnings by Month",
"Earnings Growth by Year",
"Earnings Growth by Quarter",
"Real Earnings Growth by Year",
"Real Earnings Growth by Quarter",
"Earnings Yield by Year",
"Earnings Yield by Month",
"Real Price by Year",
"Real Price by Month",
"Inflation Adjusted Price by Year",
"Inflation Adjusted Price by Month",
"Sales by Year",
"Sales by Quarter",
"Sales Growth by Year",
"Sales Growth by Quarter",
"Real Sales by Year",
"Real Sales by Quarter",
"Real Sales Growth by Year",
"Real Sales Growth by Quarter",
"Price to Sales Ratio by Year",
"Price to Sales Ratio by Quarter",
"Price to Book Value Ratio by Year",
"Price to Book Value Ratio by Quarter",
"Book Value per Share by Year",
"Book Value per Share by Quarter",
] = Field(
description="The name of the series. Defaults to 'PE Ratio by Month'.",
default="PE Ratio by Month",
series_name: SERIES_NAMES = Field(
description="The name of the series. Defaults to 'pe_month'.",
default="pe_month",
)
start_date: Optional[str] = Field(
description=QUERY_DESCRIPTIONS.get("start_date", ""), default=""
start_date: Optional[dateType] = Field(
description=QUERY_DESCRIPTIONS.get("start_date", ""), default=None
)
end_date: Optional[str] = Field(
description=QUERY_DESCRIPTIONS.get("end_date", ""), default=""
end_date: Optional[dateType] = Field(
description=QUERY_DESCRIPTIONS.get("end_date", ""), default=None
)