Files
OpenBB/openbb_terminal/core/session/constants.py
DidierRLopes c40c3f7529 Creates a "--dev" flag that points to dev backend for testing with hub (#5319)
* check that routine title is valid

* more updates

* small fixes

* override local routine

* more improvements to routine logic

* --debug runs .dev

* few more updates

* small fix

* rename BASE_URL from ultima to ULTIMA_BASE_URL

* use debug from dataclasses instead of env since env doesn't get updated

* create --dev flag that can point to .dev backend

* merge conflits

* few changes, made it actually work 🤣

---------

Co-authored-by: tehcoderer <me@tehcoderer.com>
2023-08-13 23:20:07 -07:00

56 lines
1.2 KiB
Python

class HubEnvironment:
# BASE_URL = "http://127.0.0.1:8000/"
BASE_URL = "https://payments.openbb.co/"
HUB_URL = "https://my.openbb.co/"
def __new__(cls, *args, **kwargs): # pylint: disable=W0613
"""Create a singleton instance of the backend."""
if not hasattr(cls, "instance"):
cls.instance = super().__new__(cls) # pylint: disable=E1120
return cls.instance
BackendEnvironment = HubEnvironment()
DEFAULT_ROUTINES_URL = "https://openbb-cms.directus.app/items/Routines"
TIMEOUT = 30
CONNECTION_ERROR_MSG = "[red]Connection error.[/red]"
CONNECTION_TIMEOUT_MSG = "[red]Connection timeout.[/red]"
SCRIPT_TAGS = [
"stocks",
"crypto",
"etf",
"economy",
"forex",
"fixed income",
"alternative",
"funds",
"bonds",
"macro",
"mutual funds",
"equities",
"options",
"dark pool",
"shorts",
"insider",
"behavioral analysis",
"fundamental analysis",
"technical analysis",
"quantitative analysis",
"forecasting",
"government",
"comparison",
"nft",
"on chain",
"off chain",
"screener",
"report",
"overview",
"rates",
"econometrics",
"portfolio",
"real estate",
]