-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename the fmp search -> screener (#5744)
* Rename the fmp search -> screener * misses some * i cant copy paste
- Loading branch information
Showing
8 changed files
with
134 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
openbb_platform/platform/provider/openbb_provider/standard_models/equity_screener.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"""Equity Screener data model.""" | ||
|
||
from typing import List, Set, Union | ||
|
||
from pydantic import Field, field_validator | ||
|
||
from openbb_provider.abstract.data import Data | ||
from openbb_provider.abstract.query_params import QueryParams | ||
from openbb_provider.utils.descriptions import DATA_DESCRIPTIONS | ||
|
||
|
||
class EquityScreenerQueryParams(QueryParams): | ||
"""Company Screener Query Params.""" | ||
|
||
|
||
class EquityScreenerData(Data): | ||
"""Company Screener Data.""" | ||
|
||
symbol: str = Field(description=DATA_DESCRIPTIONS.get("symbol", "")) | ||
name: str = Field(description="Name of the company.") | ||
|
||
@field_validator("symbol", mode="before", check_fields=False) | ||
@classmethod | ||
def upper_symbol(cls, v: Union[str, List[str], Set[str]]): | ||
"""Convert symbol to uppercase.""" | ||
if isinstance(v, str): | ||
return v.upper() | ||
return ",".join([symbol.upper() for symbol in list(v)]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters