Files
OpenBB/openbb_platform/providers/ecb/openbb_ecb/_installed.py
Danglewood 840658d01f [V5] openbb-ecb: Refactor for V5 and Expand Coverage (#7560)
* refactor openbb-ecb for v5 and expand coverage

* some updates

* tests

* workflow

* remove 3.15 from test matrix

* some more table schema updates

* remove some html chrome on embedded articles

---------

Co-authored-by: deeleeramone <>
2026-09-23 11:57:59 -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