* init * Update provider_interface.py * docstring * pydantic v2 * Update __init__.py * build package v2 support * `alises` to `aliases` Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> * `alises` to `aliases` Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> * `alises` to `aliases` Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> * updates * Update registry.py * validate_arguments -> validate_call * update terminal classes * response_model_by_alias = False * query_params by alias * Update major_indices_constituents.py * add alias to Query in `provider_interface` * yfinance * build package, add param defaults and correct `OBBject` results type * fix cpi validation errors * Update risk_premium.py * fix `forex_pairs` active query param annotation, set default when only 1 provider * fix and refactor intrinio `options_chains` * Update poetry.lock * fix benzinga news, build package, add intrinio fred_historical fetcher * Update extension_map.json * ruff * Update unit_test_generator.py * updates * add `default=None` on Optional fields * `parse_obj` -> `model_validate` * add alias to dup fields on providers with `__alias_dict__`, fix `test_generate_model_docstring` * Update package_builder.py * fix validation errors, fix tests * tests http * `fred_historical` record * Update test_intrinio_fetchers.py * Update test_intrinio_fetchers.py * Update test_intrinio_fetchers.py * Update available_indices.py * Update stock_historical.py * build package * build package without optional * change `SystemSettings` -> `MockSystemSettings` in `test_system_settings.py` * `openbb_figure.py`/`backend.py` terminal changes , update deps/lock files * `linearmodels>4.26` auto installs `setuptools-scm` which cause error messages * clean up * `dev_install.py` for local development * ruff * dup `# noqa` * build * Update bitquery_model.py * records * rec * f * worky? * update `integration_test_generator.py` and `unit_test_generator.py` * renamed test to tests in file * fix import due to change in file name --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
OpenBB Charting extension
This extension provides a charting library for OpenBB SDK.
The library includes:
- a charting infrastructure based on Plotly
- a set of charting components
- prebuilt charts for a set of commands that are built-in OpenBB SDK extensions
Installation
To install the extension, run the following command in this folder:
pip install openbb-charting
PyWry dependency on Linux
The PyWry dependency handles display of interactive charts and tables in a separate window. It is installed automatically with the OpenBB Charting extension.
When using Linux distributions, the PyWry dependency requires certain dependencies to be installed first.
-
Debian-based / Ubuntu / Mint:
sudo apt install libwebkit2gtk-4.0-dev -
Arch Linux / Manjaro:
sudo pacman -S webkit2gtk -
Fedora:
sudo dnf install gtk3-devel webkit2gtk3-devel
Usage
To use the extension, run any of the OpenBB SDK endpoints with the chart argument set to True.
Here's an example how it would look like in a python interface:
from openbb import obb
stock_data = obb.stocks.load(symbol="TSLA", chart=True)
This results in a OBBject object containing a chart attribute, which contains Plotly JSON data.
In order to display the chart, you need to call the show() method:
stock_data.show()
Note: The
show()method currently works either in a Jupyter Notebook or in a standalone python script with a PyWry based backend properly initialized.