Skip to main content

openbb-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:

  1. Discover provider, command, and result-type extensions installed in the current Python environment via setuptools entry points.
  2. Stitch them together into a single typed Python client (from openbb import obb) and an equivalent FastAPI REST API.
  3. Execute calls against those extensions, normalise the output through shared Pydantic models, and return a uniform OBBject result 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 OBBject result wrapper. There are two flavours, configured on the same Extension instance:

1. Accessor extensions (default — on_command_output=False)

Add a namespace attribute on every OBBject, pandas-style. The entry-point name becomes the attribute name. Used for opt-in transformations the caller explicitly invokes:

result = obb.equity.price.historical("AAPL")
result.charting.to_chart()  # accessor registered by openbb_charting
[project.entry-points."openbb_obbject_extension"]
charting = "openbb_charting:ext"   # ext = Extension(name="charting")

2. on_command_output callbacks (post-execution hooks)

Set on_command_output=True to make the extension run automatically on the OBBject returned by every command, or only by specific routes via command_output_paths. ExtensionLoader._register_command_output_callbacks indexes them by path (with "*" meaning "all commands") and the API layer (openbb_core/api/router/commands.py) applies them after the command runs.

Three flags govern their behaviour:

  • on_command_output: bool — enable the post-execution hook.
  • command_output_paths: list[str] | None — restrict to specific endpoint paths; None means every command.
  • immutable: bool = True — if False, the hook may modify OBBject.results in place. Mutable hooks additionally require system_settings.allow_mutable_extensions=True.
  • results_only: bool = False — return just OBBject.results over the REST API instead of the full envelope.
[project.entry-points."openbb_obbject_extension"]
my_hook = "openbb_my_hook:ext"
# ext = Extension(
#     name="my_hook",
#     on_command_output=True,
#     command_output_paths=["/equity/price/historical"],
#     immutable=False,
# )

Because these hooks run on every matching response, they are gated by an explicit opt-in: system_settings.allow_on_command_output (env: OPENBB_ALLOW_ON_COMMAND_OUTPUT) must be True, or instantiating the Extension will raise. Mutating hooks need allow_mutable_extensions (env: OPENBB_ALLOW_MUTABLE_EXTENSIONS) on top of that. Treat on_command_output extensions as code that runs against every result — only install them from sources you trust.

Console script: openbb-build

openbb-core installs one console script:

openbb-build

It is defined in openbb_core/build.py (openbb-build = openbb_core.build:main). It imports the openbb package in a subprocess, which triggers static-client generation when the generated package is missing or stale, and falls back to calling openbb.build() explicitly if the import did not rebuild. Run it after installing or upgrading any extension to regenerate openbb/package/ and reference.json.

What lives inside the package

  • openbb_core.provider — base classes (Data, QueryParams, Provider, Fetcher) and the registry that turns openbb_provider_extension entries into a queryable map of (standard_model, provider) -> Fetcher.
  • openbb_core.provider.standard_models — the shared Pydantic schemas (equity prices, options chains, CPI, treasury rates, etc.) that every provider maps onto. This is what makes "swap providers without changing caller code" possible.
  • openbb_core.app.router.Router — a thin wrapper around FastAPI's APIRouter used by openbb_core_extension packages to declare commands.
  • openbb_core.app.command_runner — the execution path used by the generated Python client: resolves provider choice, runs the matching Fetcher, applies post-processing hooks, and returns an OBBject.
  • openbb_core.app.static.package_builder — walks the merged router and emits the typed openbb/package/ modules plus reference.json. This is what openbb-build ultimately drives.
  • openbb_core.api.rest_api — the FastAPI app (app) built from the same routers, with auth hooks and OpenAPI generation. Serve it with any ASGI server.
  • openbb_core.app.extension_loader — the entry-point discovery layer described above.
  • openbb_core.app.service — system settings, user settings, credentials, and auth services shared by the runtime and the REST API.
  • openbb_core.app.logs — structured logging with rotating file handlers.

Prerequisites

  • Python >=3.10,<4
  • For extension authors: working knowledge of FastAPI and Pydantic v2.

Installation

pip install openbb-core

You normally do not install openbb-core directly — openbb and provider extensions pull it in. Install it explicitly only when authoring an extension.

Running the REST API

uvicorn openbb_core.api.rest_api:app --reload

The same router graph that backs from openbb import obb is exposed over HTTP, with OpenAPI available at /docs.

Bugs

Report bugs on GitHub.

License

Apache-2.0. See LICENSE.

Metadata

Release files for openbb-core 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openbb-core 2.0.1
File Size Uploaded
openbb_core-2.0.1.tar.gz 285.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openbb-core 2.0.1
File Interpreter ABI Platform
openbb_core-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 721.8 kB

Release files / openbb_core-2.0.1.tar.gz

Download URL openbb_core-2.0.1.tar.gz
Size 285.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c656d3c4bb86a689e5f07a295988ad787225707be3552cbb622b4ecef7da0dc8
BLAKE2b-256 checksum
How to use checksums
a2af5e331eba80b1623df5310001e0107ba60854fec0cf7b254c831c004d4c16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / openbb_core-2.0.1-py3-none-any.whl

Download URL openbb_core-2.0.1-py3-none-any.whl
Size 436.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f5aa21ba00cbf194423f154a58f60ee413599531cf1c4abfe5ef3275a516f64
BLAKE2b-256 checksum
How to use checksums
8277795eb63d7dd09d1a1766add005fa6216f2d7c17b09c020f31436caac9cac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

2.0.0

2 release files

1.6.13

2 release files

1.6.12

2 release files

1.6.10

2 release files

1.6.9

2 release files

1.6.8

2 release files

1.6.7

2 release files

1.6.6

2 release files

1.6.5

2 release files

1.6.4

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.9

2 release files

1.5.8

2 release files

1.5.7

2 release files

1.5.6

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.8

2 release files

1.4.7

2 release files

1.4.6

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.8

2 release files

1.3.7

2 release files

1.3.6

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.9

2 release files

1.2.8

1 release file

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page