example notebook updates (#6639)

This commit is contained in:
Danglewood
2024-08-26 04:23:47 -07:00
committed by GitHub
parent 969113a51d
commit d172dcb801
9 changed files with 14146 additions and 13311 deletions

View File

@@ -1,6 +1,6 @@
# Pull Request OpenBB
Please go the the `Preview` tab and select the appropriate PR sub-template:
Please go to the `Preview` tab and select the appropriate PR sub-template:
* [OpenBB Platform](?expand=1&template=platform_pull_request_template.md)
* [OpenBB Platform CLI](?expand=1&template=terminal_pull_request_template.md)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -5876,7 +5876,9 @@
}
],
"source": [
"obb.equity.price.historical(\"AAPL\", start_date=\"2022-01-01\", provider='polygon').to_chart()"
"obb.equity.price.historical(\n",
" \"AAPL\", start_date=\"2022-01-01\", provider=\"polygon\"\n",
").charting.to_chart()"
]
},
{
@@ -6098,7 +6100,9 @@
"\n",
"llm_historical_price = StructuredTool.from_function(\n",
" func=obb.equity.price.historical,\n",
" description=obb.equity.price.historical.__doc__.split('\\n')[0] # Use first line of docstring\n",
" description=obb.equity.price.historical.__doc__.split(\"\\n\")[\n",
" 0\n",
" ], # Use first line of docstring\n",
")"
]
},
@@ -6118,11 +6122,10 @@
"llm_tools = [\n",
" StructuredTool.from_function(\n",
" name=name,\n",
" func=schema['callable'],\n",
" description=schema['callable'].__doc__.split('\\n')[0]\n",
" func=schema[\"callable\"],\n",
" description=schema[\"callable\"].__doc__.split(\"\\n\")[0],\n",
" )\n",
" for name, schema\n",
" in obb.coverage.command_schemas().items()\n",
" for name, schema in obb.coverage.command_schemas().items()\n",
"]"
]
},
@@ -6181,14 +6184,14 @@
" [\n",
" (\"system\", \"You are a very powerful assistant, but don't know current events\"),\n",
" (\"user\", \"{input}\"),\n",
" MessagesPlaceholder(variable_name=\"agent_scratchpad\")\n",
" MessagesPlaceholder(variable_name=\"agent_scratchpad\"),\n",
" ]\n",
")\n",
"\n",
"llm_tools = [\n",
" StructuredTool.from_function(\n",
" func=obb.equity.price.quote,\n",
" description=obb.equity.price.quote.__doc__.split(\"\\n\")[0]\n",
" description=obb.equity.price.quote.__doc__.split(\"\\n\")[0],\n",
" )\n",
"]\n",
"\n",

View File

@@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## How platform works"
"# How The OpenBB Platform Works"
]
},
{
@@ -18,63 +18,9 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"OpenBB Platform v4.1.3dev\n",
"\n",
"Utilities:\n",
" /account\n",
" /user\n",
" /system\n",
" /coverage\n",
"\n",
"Routers:\n",
" /crypto\n",
" /currency\n",
" /derivatives\n",
" /economy\n",
" /equity\n",
" /etf\n",
" /fixedincome\n",
" /index\n",
" /news\n",
" /regulators\n",
"\n",
"Extensions:\n",
" - crypto@1.1.1\n",
" - currency@1.1.1\n",
" - derivatives@1.1.1\n",
" - economy@1.1.1\n",
" - equity@1.1.1\n",
" - etf@1.1.1\n",
" - fixedincome@1.1.1\n",
" - index@1.1.1\n",
" - news@1.1.1\n",
" - openbb_charting@1.1.1\n",
" - regulators@1.1.1\n",
"\n",
" - benzinga@1.1.1\n",
" - federal_reserve@1.1.1\n",
" - fmp@1.1.1\n",
" - fred@1.1.1\n",
" - intrinio@1.1.1\n",
" - oecd@1.1.1\n",
" - polygon@1.1.1\n",
" - sec@1.1.1\n",
" - tiingo@1.1.1\n",
" - tradingeconomics@1.1.1\n",
" - yfinance@1.1.1 "
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"obb"
]
@@ -113,25 +59,23 @@
"text": [
"Help on method world in module openbb.package.news:\n",
"\n",
"world(limit: typing.Annotated[int, OpenBBCustomParameter(description='The number of data entries to return. Here its the no. of articles to return.')] = 20, provider: Optional[Literal['benzinga', 'fmp', 'intrinio', 'tiingo']] = None, **kwargs) -> openbb_core.app.model.obbject.OBBject method of openbb.package.news.ROUTER_news instance\n",
"world(limit: Annotated[int, OpenBBField(description='The number of data entries to return. The number of articles to return.')] = 2500, start_date: Annotated[Union[datetime.date, NoneType, str], OpenBBField(description='Start date of the data, in YYYY-MM-DD format.')] = None, end_date: Annotated[Union[datetime.date, NoneType, str], OpenBBField(description='End date of the data, in YYYY-MM-DD format.')] = None, provider: Annotated[Optional[Literal['benzinga', 'biztoc', 'fmp', 'intrinio', 'tiingo']], OpenBBField(description='The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga, biztoc, fmp, intrinio, tiingo.')] = None, **kwargs) -> openbb_core.app.model.obbject.OBBject method of openbb.package.news.ROUTER_news instance\n",
" World News. Global news data.\n",
" \n",
"\n",
" Parameters\n",
" ----------\n",
" limit : int\n",
" The number of data entries to return. Here its the no. of articles to return.\n",
" provider : Optional[Literal['benzinga', 'fmp', 'intrinio', 'tiingo']]\n",
" The provider to use for the query, by default None.\n",
" If None, the provider specified in defaults is selected or 'benzinga' if there is\n",
" no default.\n",
" The number of data entries to return. The number of articles to return.\n",
" start_date : Union[date, None, str]\n",
" Start date of the data, in YYYY-MM-DD format.\n",
" end_date : Union[date, None, str]\n",
" End date of the data, in YYYY-MM-DD format.\n",
" provider : Optional[Literal['benzinga', 'biztoc', 'fmp', 'intrinio', 'tiingo']]\n",
" The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga, biztoc, fmp, intrinio, tiingo.\n",
" date : Optional[datetime.date]\n",
" A specific date to get data for. (provider: benzinga)\n",
" display : Literal['headline', 'abstract', 'full']\n",
" Specify headline only (headline), headline + teaser (abstract), or headline + full body (full). (provider: benzinga)\n",
" date : Optional[str]\n",
" Date of the news to retrieve. (provider: benzinga)\n",
" start_date : Optional[str]\n",
" Start date of the news to retrieve. (provider: benzinga)\n",
" end_date : Optional[str]\n",
" End date of the news to retrieve. (provider: benzinga)\n",
" updated_since : Optional[int]\n",
" Number of seconds since the news was updated. (provider: benzinga)\n",
" published_since : Optional[int]\n",
@@ -152,35 +96,57 @@
" Authors of the news to retrieve. (provider: benzinga)\n",
" content_types : Optional[str]\n",
" Content types of the news to retrieve. (provider: benzinga)\n",
" source : Optional[str]\n",
" term : Optional[str]\n",
" Search term to filter articles by. This overrides all other filters. (provider: biztoc)\n",
" source : Optional[Union[str, Literal['yahoo', 'moody', 'moody_us_news', 'moody_us_press_releases']]]\n",
" Filter by a specific publisher. Only valid when filter is set to source. (provider: biztoc);\n",
" The source of the news article. (provider: intrinio);\n",
" A comma-separated list of the domains requested. (provider: tiingo)\n",
" \n",
" sentiment : Optional[Literal['positive', 'neutral', 'negative']]\n",
" Return news only from this source. (provider: intrinio)\n",
" language : Optional[str]\n",
" Filter by language. Unsupported for yahoo source. (provider: intrinio)\n",
" topic : Optional[str]\n",
" Filter by topic. Unsupported for yahoo source. (provider: intrinio)\n",
" word_count_greater_than : Optional[int]\n",
" News stories will have a word count greater than this value. Unsupported for yahoo source. (provider: intrinio)\n",
" word_count_less_than : Optional[int]\n",
" News stories will have a word count less than this value. Unsupported for yahoo source. (provider: intrinio)\n",
" is_spam : Optional[bool]\n",
" Filter whether it is marked as spam or not. Unsupported for yahoo source. (provider: intrinio)\n",
" business_relevance_greater_than : Optional[float]\n",
" News stories will have a business relevance score more than this value. Unsupported for yahoo source. Value is a decimal between 0 and 1. (provider: intrinio)\n",
" business_relevance_less_than : Optional[float]\n",
" News stories will have a business relevance score less than this value. Unsupported for yahoo source. Value is a decimal between 0 and 1. (provider: intrinio)\n",
" offset : Optional[int]\n",
" Page offset, used in conjunction with limit. (provider: tiingo)\n",
"\n",
" Returns\n",
" -------\n",
" OBBject\n",
" results : List[WorldNews]\n",
" Serializable results.\n",
" provider : Optional[Literal['benzinga', 'fmp', 'intrinio', 'tiingo']]\n",
" provider : Optional[Literal['benzinga', 'biztoc', 'fmp', 'intrinio', 'tiingo']]\n",
" Provider name.\n",
" warnings : Optional[List[Warning_]]\n",
" List of warnings.\n",
" chart : Optional[Chart]\n",
" Chart object.\n",
" extra: Dict[str, Any]\n",
" extra : Dict[str, Any]\n",
" Extra info.\n",
" \n",
"\n",
" WorldNews\n",
" ---------\n",
" date : datetime\n",
" The date of the data. Here it is the published date of the news.\n",
" The date of the data. The published date of the article.\n",
" title : str\n",
" Title of the news.\n",
" Title of the article.\n",
" images : Optional[List[Dict[str, str]]]\n",
" Images associated with the news.\n",
" Images associated with the article.\n",
" text : Optional[str]\n",
" Text/body of the news.\n",
" Text/body of the article.\n",
" url : Optional[str]\n",
" URL of the news.\n",
" URL to the article.\n",
" id : Optional[str]\n",
" Article ID. (provider: benzinga, intrinio)\n",
" author : Optional[str]\n",
@@ -191,25 +157,60 @@
" Channels associated with the news. (provider: benzinga)\n",
" stocks : Optional[str]\n",
" Stocks associated with the news. (provider: benzinga)\n",
" tags : Optional[str]\n",
" Tags associated with the news. (provider: benzinga, tiingo)\n",
" tags : Optional[Union[str, List[str]]]\n",
" Tags associated with the news. (provider: benzinga, biztoc, tiingo)\n",
" updated : Optional[datetime]\n",
" Updated date of the news. (provider: benzinga)\n",
" score : Optional[float]\n",
" Search relevance score for the article. (provider: biztoc)\n",
" site : Optional[str]\n",
" News source. (provider: fmp, tiingo)\n",
" company : Optional[Dict[str, Any]]\n",
" Company details related to the news article. (provider: intrinio)\n",
" source : Optional[str]\n",
" The source of the news article. (provider: intrinio)\n",
" summary : Optional[str]\n",
" The summary of the news article. (provider: intrinio)\n",
" topics : Optional[str]\n",
" The topics related to the news article. (provider: intrinio)\n",
" word_count : Optional[int]\n",
" The word count of the news article. (provider: intrinio)\n",
" business_relevance : Optional[float]\n",
" How strongly correlated the news article is to the business (provider: intrinio)\n",
" sentiment : Optional[str]\n",
" The sentiment of the news article - i.e, negative, positive. (provider: intrinio)\n",
" sentiment_confidence : Optional[float]\n",
" The confidence score of the sentiment rating. (provider: intrinio)\n",
" language : Optional[str]\n",
" The language of the news article. (provider: intrinio)\n",
" spam : Optional[bool]\n",
" Whether the news article is spam. (provider: intrinio)\n",
" copyright : Optional[str]\n",
" The copyright notice of the news article. (provider: intrinio)\n",
" company : Optional[IntrinioCompany]\n",
" The Intrinio Company object. Contains details company reference data. (provider: intrinio)\n",
" security : Optional[IntrinioSecurity]\n",
" The Intrinio Security object. Contains the security details related to the news article. (provider: intrinio)\n",
" symbols : Optional[str]\n",
" Ticker tagged in the fetched news. (provider: tiingo)\n",
" article_id : Optional[int]\n",
" Unique ID of the news article. (provider: tiingo)\n",
" crawl_date : Optional[datetime]\n",
" Date the news article was crawled. (provider: tiingo)\n",
" \n",
" Example\n",
" -------\n",
"\n",
" Examples\n",
" --------\n",
" >>> from openbb import obb\n",
" >>> obb.news.world(limit=20)\n",
" >>> obb.news.world(provider='fmp')\n",
" >>> obb.news.world(limit=100, provider='intrinio')\n",
" >>> # Get news on the specified dates.\n",
" >>> obb.news.world(start_date='2024-02-01', end_date='2024-02-07', provider='intrinio')\n",
" >>> # Display the headlines of the news.\n",
" >>> obb.news.world(display='headline', provider='benzinga')\n",
" >>> # Get news by topics.\n",
" >>> obb.news.world(topics='finance', provider='benzinga')\n",
" >>> # Get news by source using 'tingo' as provider.\n",
" >>> obb.news.world(provider='tiingo', source='bloomberg')\n",
" >>> # Filter aticles by term using 'biztoc' as provider.\n",
" >>> obb.news.world(provider='biztoc', term='apple')\n",
"\n"
]
}
@@ -251,41 +252,46 @@
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th>date</th>\n",
" <th>2024-02-07 09:58:35+00:00</th>\n",
" <th>2024-08-22 18:02:00+00:00</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>title</th>\n",
" <td>Should You be Bullish on Chart Industries (GT...</td>\n",
" <td>Natural Grocers® Teams Up With Local Artist, S...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>text</th>\n",
" <td>Baron Funds, an investment management company,...</td>\n",
" <td>Natural Grocers®, the leading family-operated ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>url</th>\n",
" <td>https://finance.yahoo.com/news/bullish-chart-i...</td>\n",
" <td>https://finance.yahoo.com/news/natural-grocers...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>source</th>\n",
" <td>yahoo</td>\n",
" </tr>\n",
" <tr>\n",
" <th>id</th>\n",
" <td>nws_AGnVkk</td>\n",
" <td>new_DDGR2v</td>\n",
" </tr>\n",
" <tr>\n",
" <th>company</th>\n",
" <td>{'id': 'com_0yb6by', 'ticker': 'GTLS', 'name':...</td>\n",
" <td>{'id': 'com_g4Q8NX', 'ticker': 'NGVC', 'name':...</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"date 2024-02-07 09:58:35+00:00\n",
"title Should You be Bullish on Chart Industries (GT...\n",
"text Baron Funds, an investment management company,...\n",
"url https://finance.yahoo.com/news/bullish-chart-i...\n",
"id nws_AGnVkk\n",
"company {'id': 'com_0yb6by', 'ticker': 'GTLS', 'name':..."
"date 2024-08-22 18:02:00+00:00\n",
"title Natural Grocers® Teams Up With Local Artist, S...\n",
"text Natural Grocers®, the leading family-operated ...\n",
"url https://finance.yahoo.com/news/natural-grocers...\n",
"source yahoo\n",
"id new_DDGR2v\n",
"company {'id': 'com_g4Q8NX', 'ticker': 'NGVC', 'name':..."
]
},
"execution_count": 5,
@@ -323,71 +329,71 @@
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th>date</th>\n",
" <th>2024-02-07 06:14:10-04:00</th>\n",
" <th>2024-08-22 14:46:33-04:00</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>title</th>\n",
" <td>Keybanc Maintains Overweight on FMC, Lowers Pr...</td>\n",
" <td>Behind the Scenes of Vertiv Hldgs's Latest Opt...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>images</th>\n",
" <td>[]</td>\n",
" <td>[{'size': 'thumb', 'url': 'https://cdn.benzing...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>text</th>\n",
" <td>Keybanc analyst Aleksey Yefremov maintains ...</td>\n",
" <td>&lt;p&gt;Whales with a lot of money to spend have ta...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>url</th>\n",
" <td>https://www.benzinga.com/news/24/02/36974882/k...</td>\n",
" <td>https://www.benzinga.com/insights/options/24/0...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>id</th>\n",
" <td>36974882</td>\n",
" <td>40515079</td>\n",
" </tr>\n",
" <tr>\n",
" <th>author</th>\n",
" <td>Benzinga Newsdesk</td>\n",
" <td>Benzinga Insights</td>\n",
" </tr>\n",
" <tr>\n",
" <th>teaser</th>\n",
" <td>Keybanc analyst Aleksey Yefremov maintains ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>channels</th>\n",
" <td>News,Price Target,Analyst Ratings</td>\n",
" </tr>\n",
" <tr>\n",
" <th>stocks</th>\n",
" <td>FMC</td>\n",
" </tr>\n",
" <tr>\n",
" <th>tags</th>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>channels</th>\n",
" <td>Options,Markets</td>\n",
" </tr>\n",
" <tr>\n",
" <th>stocks</th>\n",
" <td>VRT</td>\n",
" </tr>\n",
" <tr>\n",
" <th>tags</th>\n",
" <td>BZI-UOA</td>\n",
" </tr>\n",
" <tr>\n",
" <th>updated</th>\n",
" <td>2024-02-07 06:14:11-04:00</td>\n",
" <td>2024-08-22 14:46:33-04:00</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"date 2024-02-07 06:14:10-04:00\n",
"title Keybanc Maintains Overweight on FMC, Lowers Pr...\n",
"images []\n",
"text Keybanc analyst Aleksey Yefremov maintains ...\n",
"url https://www.benzinga.com/news/24/02/36974882/k...\n",
"id 36974882\n",
"author Benzinga Newsdesk\n",
"teaser Keybanc analyst Aleksey Yefremov maintains ...\n",
"channels News,Price Target,Analyst Ratings\n",
"stocks FMC\n",
"tags \n",
"updated 2024-02-07 06:14:11-04:00"
"date 2024-08-22 14:46:33-04:00\n",
"title Behind the Scenes of Vertiv Hldgs's Latest Opt...\n",
"images [{'size': 'thumb', 'url': 'https://cdn.benzing...\n",
"text <p>Whales with a lot of money to spend have ta...\n",
"url https://www.benzinga.com/insights/options/24/0...\n",
"id 40515079\n",
"author Benzinga Insights\n",
"teaser \n",
"channels Options,Markets\n",
"stocks VRT\n",
"tags BZI-UOA\n",
"updated 2024-08-22 14:46:33-04:00"
]
},
"execution_count": 6,
@@ -433,11 +439,11 @@
{
"data": {
"text/plain": [
"{'date': FieldInfo(annotation=datetime, required=True, alias='date', alias_priority=1, description='The date of the data. Here it is the published date of the news.'),\n",
" 'title': FieldInfo(annotation=str, required=True, alias='title', alias_priority=1, description='Title of the news.'),\n",
" 'images': FieldInfo(annotation=Union[List[Dict[str, str]], NoneType], required=False, alias='images', alias_priority=1, description='Images associated with the news.'),\n",
" 'text': FieldInfo(annotation=Union[str, NoneType], required=False, alias='text', alias_priority=1, description='Text/body of the news.'),\n",
" 'url': FieldInfo(annotation=Union[str, NoneType], required=False, alias='url', alias_priority=1, description='URL of the news.')}"
"{'date': FieldInfo(annotation=datetime, required=True, alias_priority=1, validation_alias='date', serialization_alias='date', description='The date of the data. The published date of the article.'),\n",
" 'title': FieldInfo(annotation=str, required=True, alias_priority=1, validation_alias='title', serialization_alias='title', description='Title of the article.'),\n",
" 'images': FieldInfo(annotation=Union[List[Dict[str, str]], NoneType], required=False, default=None, alias_priority=1, validation_alias='images', serialization_alias='images', description='Images associated with the article.'),\n",
" 'text': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='text', serialization_alias='text', description='Text/body of the article.'),\n",
" 'url': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='url', serialization_alias='url', description='URL to the article.')}"
]
},
"execution_count": 7,
@@ -447,6 +453,7 @@
],
"source": [
"from openbb_core.provider.standard_models.world_news import WorldNewsData\n",
"\n",
"WorldNewsData.__fields__"
]
},
@@ -475,13 +482,24 @@
{
"data": {
"text/plain": [
"{'date': FieldInfo(annotation=datetime, required=True, alias='date', alias_priority=1, description='The date of the data. Here it is the published date of the news.'),\n",
" 'title': FieldInfo(annotation=str, required=True, alias='title', alias_priority=1, description='Title of the news.'),\n",
" 'images': FieldInfo(annotation=Union[List[Dict[str, str]], NoneType], required=False, alias='images', alias_priority=1, description='Images associated with the news.'),\n",
" 'text': FieldInfo(annotation=Union[str, NoneType], required=False, alias='text', alias_priority=1, description='Text/body of the news.'),\n",
" 'url': FieldInfo(annotation=Union[str, NoneType], required=False, alias='url', alias_priority=1, description='URL of the news.'),\n",
" 'id': FieldInfo(annotation=str, required=True, alias='id', alias_priority=1, description='Article ID.'),\n",
" 'company': FieldInfo(annotation=Dict[str, Any], required=True, alias='company', alias_priority=1, description='Company details related to the news article.')}"
"{'date': FieldInfo(annotation=datetime, required=True, alias_priority=1, validation_alias='date', serialization_alias='date', description='The date of the data. The published date of the article.'),\n",
" 'title': FieldInfo(annotation=str, required=True, alias_priority=1, validation_alias='title', serialization_alias='title', description='Title of the article.'),\n",
" 'images': FieldInfo(annotation=Union[List[Dict[str, str]], NoneType], required=False, default=None, alias_priority=1, validation_alias='images', serialization_alias='images', description='Images associated with the article.'),\n",
" 'text': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='text', serialization_alias='text', description='Text/body of the article.'),\n",
" 'url': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='url', serialization_alias='url', description='URL to the article.'),\n",
" 'source': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='source', serialization_alias='source', description='The source of the news article.'),\n",
" 'summary': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='summary', serialization_alias='summary', description='The summary of the news article.'),\n",
" 'topics': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='topics', serialization_alias='topics', description='The topics related to the news article.'),\n",
" 'word_count': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, alias_priority=1, validation_alias='wordCount', serialization_alias='word_count', description='The word count of the news article.'),\n",
" 'business_relevance': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, alias_priority=1, validation_alias='businessRelevance', serialization_alias='business_relevance', description=' \\tHow strongly correlated the news article is to the business'),\n",
" 'sentiment': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='sentiment', serialization_alias='sentiment', description='The sentiment of the news article - i.e, negative, positive.'),\n",
" 'sentiment_confidence': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, alias_priority=1, validation_alias='sentimentConfidence', serialization_alias='sentiment_confidence', description='The confidence score of the sentiment rating.'),\n",
" 'language': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='language', serialization_alias='language', description='The language of the news article.'),\n",
" 'spam': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None, alias_priority=1, validation_alias='spam', serialization_alias='spam', description='Whether the news article is spam.'),\n",
" 'copyright': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='copyright', serialization_alias='copyright', description='The copyright notice of the news article.'),\n",
" 'id': FieldInfo(annotation=str, required=True, alias_priority=1, validation_alias='id', serialization_alias='id', description='Article ID.'),\n",
" 'company': FieldInfo(annotation=Union[IntrinioCompany, NoneType], required=False, default=None, alias_priority=1, validation_alias='company', serialization_alias='company', description='The Intrinio Company object. Contains details company reference data.'),\n",
" 'security': FieldInfo(annotation=Union[IntrinioSecurity, NoneType], required=False, default=None, alias_priority=1, validation_alias='security', serialization_alias='security', description='The Intrinio Security object. Contains the security details related to the news article.')}"
]
},
"execution_count": 9,
@@ -501,18 +519,18 @@
{
"data": {
"text/plain": [
"{'date': FieldInfo(annotation=datetime, required=True, alias='date', alias_priority=1, description='The date of the data. Here it is the published date of the news.'),\n",
" 'title': FieldInfo(annotation=str, required=True, alias='title', alias_priority=1, description='Title of the news.'),\n",
" 'images': FieldInfo(annotation=Union[List[Dict[str, str]], NoneType], required=False, alias='images', alias_priority=1, description='Images associated with the news.'),\n",
" 'text': FieldInfo(annotation=Union[str, NoneType], required=False, alias='text', alias_priority=1, description='Text/body of the news.'),\n",
" 'url': FieldInfo(annotation=Union[str, NoneType], required=False, alias='url', alias_priority=1, description='URL of the news.'),\n",
" 'id': FieldInfo(annotation=str, required=True, alias='id', alias_priority=1, description='Article ID.'),\n",
" 'author': FieldInfo(annotation=Union[str, NoneType], required=False, alias='author', alias_priority=1, description='Author of the news.'),\n",
" 'teaser': FieldInfo(annotation=Union[str, NoneType], required=False, alias='teaser', alias_priority=1, description='Teaser of the news.'),\n",
" 'channels': FieldInfo(annotation=Union[str, NoneType], required=False, alias='channels', alias_priority=1, description='Channels associated with the news.'),\n",
" 'stocks': FieldInfo(annotation=Union[str, NoneType], required=False, alias='stocks', alias_priority=1, description='Stocks associated with the news.'),\n",
" 'tags': FieldInfo(annotation=Union[str, NoneType], required=False, alias='tags', alias_priority=1, description='Tags associated with the news.'),\n",
" 'updated': FieldInfo(annotation=Union[datetime, NoneType], required=False, alias='updated', alias_priority=1, description='Updated date of the news.')}"
"{'date': FieldInfo(annotation=datetime, required=True, alias_priority=1, validation_alias='date', serialization_alias='date', description='The date of the data. The published date of the article.'),\n",
" 'title': FieldInfo(annotation=str, required=True, alias_priority=1, validation_alias='title', serialization_alias='title', description='Title of the article.'),\n",
" 'images': FieldInfo(annotation=Union[List[Dict[str, str]], NoneType], required=False, default=None, alias_priority=1, validation_alias='images', serialization_alias='images', description='Images associated with the article.'),\n",
" 'text': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='text', serialization_alias='text', description='Text/body of the article.'),\n",
" 'url': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='url', serialization_alias='url', description='URL to the article.'),\n",
" 'id': FieldInfo(annotation=str, required=True, alias_priority=1, validation_alias='id', serialization_alias='id', description='Article ID.'),\n",
" 'author': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='author', serialization_alias='author', description='Author of the news.'),\n",
" 'teaser': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='teaser', serialization_alias='teaser', description='Teaser of the news.'),\n",
" 'channels': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='channels', serialization_alias='channels', description='Channels associated with the news.'),\n",
" 'stocks': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='stocks', serialization_alias='stocks', description='Stocks associated with the news.'),\n",
" 'tags': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='tags', serialization_alias='tags', description='Tags associated with the news.'),\n",
" 'updated': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, alias_priority=1, validation_alias='updated', serialization_alias='updated', description='Updated date of the news.')}"
]
},
"execution_count": 10,
@@ -600,7 +618,9 @@
{
"data": {
"text/plain": [
"{'date_validate': Decorator(cls_ref='openbb_intrinio.models.world_news.IntrinioWorldNewsData:5617792448', cls_var_name='date_validate', func=<bound method IntrinioWorldNewsData.date_validate of <class 'openbb_intrinio.models.world_news.IntrinioWorldNewsData'>>, shim=None, info=FieldValidatorDecoratorInfo(fields=('publication_date',), mode='before', check_fields=False))}"
"{'date_validate': Decorator(cls_ref='openbb_intrinio.models.world_news.IntrinioWorldNewsData:140298041431344', cls_var_name='date_validate', func=<bound method IntrinioWorldNewsData.date_validate of <class 'openbb_intrinio.models.world_news.IntrinioWorldNewsData'>>, shim=None, info=FieldValidatorDecoratorInfo(fields=('publication_date',), mode='before', check_fields=False)),\n",
" 'topics_validate': Decorator(cls_ref='openbb_intrinio.models.world_news.IntrinioWorldNewsData:140298041431344', cls_var_name='topics_validate', func=<bound method IntrinioWorldNewsData.topics_validate of <class 'openbb_intrinio.models.world_news.IntrinioWorldNewsData'>>, shim=None, info=FieldValidatorDecoratorInfo(fields=('topics',), mode='before', check_fields=False)),\n",
" 'copyright_validate': Decorator(cls_ref='openbb_intrinio.models.world_news.IntrinioWorldNewsData:140298041431344', cls_var_name='copyright_validate', func=<bound method IntrinioWorldNewsData.copyright_validate of <class 'openbb_intrinio.models.world_news.IntrinioWorldNewsData'>>, shim=None, info=FieldValidatorDecoratorInfo(fields=('copyright',), mode='before', check_fields=False))}"
]
},
"execution_count": 13,
@@ -620,9 +640,10 @@
{
"data": {
"text/plain": [
"{'date_validate': Decorator(cls_ref='openbb_benzinga.models.world_news.BenzingaWorldNewsData:5091361632', cls_var_name='date_validate', func=<bound method BenzingaWorldNewsData.date_validate of <class 'openbb_benzinga.models.world_news.BenzingaWorldNewsData'>>, shim=None, info=FieldValidatorDecoratorInfo(fields=('date', 'updated'), mode='before', check_fields=False)),\n",
" 'list_validate': Decorator(cls_ref='openbb_benzinga.models.world_news.BenzingaWorldNewsData:5091361632', cls_var_name='list_validate', func=<bound method BenzingaWorldNewsData.list_validate of <class 'openbb_benzinga.models.world_news.BenzingaWorldNewsData'>>, shim=None, info=FieldValidatorDecoratorInfo(fields=('stocks', 'channels', 'tags'), mode='before', check_fields=False)),\n",
" 'id_validate': Decorator(cls_ref='openbb_benzinga.models.world_news.BenzingaWorldNewsData:5091361632', cls_var_name='id_validate', func=<bound method BenzingaWorldNewsData.id_validate of <class 'openbb_benzinga.models.world_news.BenzingaWorldNewsData'>>, shim=None, info=FieldValidatorDecoratorInfo(fields=('id',), mode='before', check_fields=False))}"
"{'date_validate': Decorator(cls_ref='openbb_benzinga.models.world_news.BenzingaWorldNewsData:140297991464784', cls_var_name='date_validate', func=<bound method BenzingaWorldNewsData.date_validate of <class 'openbb_benzinga.models.world_news.BenzingaWorldNewsData'>>, shim=None, info=FieldValidatorDecoratorInfo(fields=('date', 'updated'), mode='before', check_fields=False)),\n",
" 'list_validate': Decorator(cls_ref='openbb_benzinga.models.world_news.BenzingaWorldNewsData:140297991464784', cls_var_name='list_validate', func=<bound method BenzingaWorldNewsData.list_validate of <class 'openbb_benzinga.models.world_news.BenzingaWorldNewsData'>>, shim=None, info=FieldValidatorDecoratorInfo(fields=('stocks', 'channels', 'tags'), mode='before', check_fields=False)),\n",
" 'id_validate': Decorator(cls_ref='openbb_benzinga.models.world_news.BenzingaWorldNewsData:140297991464784', cls_var_name='id_validate', func=<bound method BenzingaWorldNewsData.id_validate of <class 'openbb_benzinga.models.world_news.BenzingaWorldNewsData'>>, shim=None, info=FieldValidatorDecoratorInfo(fields=('id', 'text', 'teaser', 'title', 'author'), mode='before', check_fields=False)),\n",
" 'empty_list': Decorator(cls_ref='openbb_benzinga.models.world_news.BenzingaWorldNewsData:140297991464784', cls_var_name='empty_list', func=<bound method BenzingaWorldNewsData.empty_list of <class 'openbb_benzinga.models.world_news.BenzingaWorldNewsData'>>, shim=None, info=FieldValidatorDecoratorInfo(fields=('images',), mode='before', check_fields=False))}"
]
},
"execution_count": 14,
@@ -664,63 +685,9 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"OpenBB Platform v4.1.3dev\n",
"\n",
"Utilities:\n",
" /account\n",
" /user\n",
" /system\n",
" /coverage\n",
"\n",
"Routers:\n",
" /crypto\n",
" /currency\n",
" /derivatives\n",
" /economy\n",
" /equity\n",
" /etf\n",
" /fixedincome\n",
" /index\n",
" /news\n",
" /regulators\n",
"\n",
"Extensions:\n",
" - crypto@1.1.1\n",
" - currency@1.1.1\n",
" - derivatives@1.1.1\n",
" - economy@1.1.1\n",
" - equity@1.1.1\n",
" - etf@1.1.1\n",
" - fixedincome@1.1.1\n",
" - index@1.1.1\n",
" - news@1.1.1\n",
" - openbb_charting@1.1.1\n",
" - regulators@1.1.1\n",
"\n",
" - benzinga@1.1.1\n",
" - federal_reserve@1.1.1\n",
" - fmp@1.1.1\n",
" - fred@1.1.1\n",
" - intrinio@1.1.1\n",
" - oecd@1.1.1\n",
" - polygon@1.1.1\n",
" - sec@1.1.1\n",
" - tiingo@1.1.1\n",
" - tradingeconomics@1.1.1\n",
" - yfinance@1.1.1 "
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"obb"
]
@@ -734,40 +701,9 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"openbb 4.1.3\n",
"openbb-benzinga 1.1.1\n",
"openbb-charting 1.1.1\n",
"openbb-core 1.1.1\n",
"openbb-crypto 1.1.1\n",
"openbb-currency 1.1.1\n",
"openbb-derivatives 1.1.1\n",
"openbb-economy 1.1.1\n",
"openbb-equity 1.1.1\n",
"openbb-etf 1.1.1\n",
"openbb-federal-reserve 1.1.1\n",
"openbb-fixedincome 1.1.1\n",
"openbb-fmp 1.1.1\n",
"openbb-fred 1.1.1\n",
"openbb-index 1.1.1\n",
"openbb-intrinio 1.1.1\n",
"openbb-news 1.1.1\n",
"openbb-oecd 1.1.1\n",
"openbb-polygon 1.1.1\n",
"openbb-regulators 1.1.1\n",
"openbb-sec 1.1.1\n",
"openbb-tiingo 1.1.1\n",
"openbb-tradingeconomics 1.1.1\n",
"openbb-yfinance 1.1.1\n"
]
}
],
"outputs": [],
"source": [
"!pip list | grep openbb"
]
@@ -794,10 +730,10 @@
"source": [
"To learn more about how it works, here are a few links to the [documentation](https://docs.openbb.co/platform):\n",
"\n",
"- [Architecture. Data, Query Parameters and Fetchers.](https://docs.openbb.co/platform/development/developer-guidelines/architectural_considerations)\n",
"- [Integrating a new provider.](https://docs.openbb.co/platform/development/developer-guidelines/add_data_point)\n",
"- [Building standalone extensions.](https://docs.openbb.co/platform/development/developer-guidelines/build_openbb_extensions)\n",
"- and more in the [Development](https://docs.openbb.co/platform/development) section of the docs...\n"
"- [Architecture. Data, Query Parameters and Fetchers.](https://docs.openbb.co/platform/developer_guide/architecture_overview)\n",
"- [Integrating a new provider.](https://docs.openbb.co/platform/user_guides/add_data_provider_extension)\n",
"- [Building standalone extensions.](https://docs.openbb.co/platform/getting_started/create_new_provider_extension)\n",
"- and more in the [Development](https://docs.openbb.co/platform/developer_guide) section of the docs...\n"
]
}
],
@@ -817,7 +753,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
"version": "3.12.4"
}
},
"nbformat": 4,

File diff suppressed because it is too large Load Diff