Files
Danglewood 869cfed125 [Release] openbb-v5.0.0 (#7741)
* merge branch develop with main

* bump desktop version

* fix the merge

* sync Cargo.lock to desktop 2.0.0

* fix cli conftest.py

---------

Co-authored-by: deeleeramone <>
2026-09-29 10:58:44 -07:00

25 lines
900 B
Python

"""Detect which "owning" sibling extensions are installed."""
from __future__ import annotations
from importlib.util import find_spec
ECONOMY_INSTALLED = find_spec("openbb_economy") is not None
CURRENCY_INSTALLED = find_spec("openbb_currency") is not None
FIXEDINCOME_INSTALLED = find_spec("openbb_fixedincome") is not None
def economy_key(standard: str, alias: str) -> str:
"""Return the standard key when economy is installed, else the ECB alias."""
return standard if ECONOMY_INSTALLED else alias
def currency_key(standard: str, alias: str) -> str:
"""Return the standard key when currency is installed, else the ECB alias."""
return standard if CURRENCY_INSTALLED else alias
def fixedincome_key(standard: str, alias: str) -> str:
"""Return the standard key when fixedincome is installed, else the ECB alias."""
return standard if FIXEDINCOME_INSTALLED else alias