OpenBB package with core functionality.
Actively maintained. Last release 2 months ago, commits in 12 of the last 26 weeks. A safe choice.
pip install openbb-coreopenbb-core
openbb-core is the runtime that turns a collection of installed Python
packages into the OpenBB Platform. By itself it ships no data, no providers,
and no commands. Its job is to:
- Discover provider, command, and result-type extensions installed in the current Python environment via setuptools entry points.
- Stitch them together into a single typed Python client (
from openbb import obb) and an equivalent FastAPI REST API. - Execute calls against those extensions, normalise the output through shared
Pydantic models, and return a uniform
OBBjectresult wrapper.
If you are an end user, you install openbb (which depends on this package)
and one or more provider extensions. If you are an extension author, you
depend on openbb-core and register one of the entry points below.
Entry points
Extensions plug into the runtime through three setuptools entry-point groups
defined in openbb_core/app/extension_loader.py.
At import time, ExtensionLoader enumerates each group and the rest of the
platform consumes the results.
openbb_core_extension
A Router to mount under the platform. Each entry point is loaded as an
openbb_core.app.router.Router instance and merged into the root router. This
is how command surfaces such as obb.equity, obb.economy, obb.derivatives
get added.
# pyproject.toml of an extension
[project.entry-points."openbb_core_extension"]
equity = "openbb_equity.equity_router:router"
openbb_provider_extension
A Provider describing a data source — its credentials, the standard models
it implements, and the Fetcher classes that satisfy them. Routers do not
hard-code providers; they declare a standard model, and at call time the
runtime picks a Fetcher from any installed provider that implements it.
[project.entry-points."openbb_provider_extension"]
yfinance = "openbb_yfinance:yfinance_provider"
openbb_obbject_extension
An Extension (see openbb_core/app/model/extension.py)
attached to the result wrapper. There are two flavours, configured
on the same instance: