mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-31 06:22:18 +00:00
* Decorator to output error msg to console of missing API Key * Refactor FMP & alpha advantage * Refactor FRED & QUANDL * Refactor Polygon * Refactor FRED * Refactor FRED * Refactor Finnhub & coinmarketcap & Newsapi * Allow disabling of check api * Updating tests : disable check api for tests * Refactor Finnhub & SI & Binance * Fix linting * Fix test & add black formatting * Fix test failing * Fix test failing * Refactor CryptoPanic & Whales alert & Glassnode & Coinglass * Refactor ETHexplorer & Smartstake & Alpha Advanage & Coinbase * Add decorators to controllers * Fix test & Refactor Coinbase, RH, Reddit * Add contributing guideline * Update CONTRIBUTING.md * Update CONTRIBUTING.md * fix tests * add decorator to snews cmd Co-authored-by: Chavithra PARANA <chavithra@gmail.com> Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
63 lines
2.1 KiB
Python
63 lines
2.1 KiB
Python
import os
|
|
from distutils.util import strtobool
|
|
|
|
from dotenv import load_dotenv
|
|
|
|
env_files = [f for f in os.listdir() if f.endswith(".env")]
|
|
if env_files:
|
|
load_dotenv(env_files[0])
|
|
|
|
# Use tabulate to print dataframes
|
|
USE_TABULATE_DF = strtobool(os.getenv("GTFF_USE_TABULATE_DF", "True"))
|
|
|
|
# Use clear console after each command
|
|
USE_CLEAR_AFTER_CMD = strtobool(os.getenv("GTFF_USE_CLEAR_AFTER_CMD", "False"))
|
|
|
|
# Use coloring features
|
|
USE_COLOR = strtobool(os.getenv("GTFF_USE_COLOR", "True"))
|
|
|
|
# Select console flair (choose from config_terminal.py list)
|
|
USE_FLAIR = os.getenv("GTFF_USE_FLAIR") or ":stars"
|
|
|
|
# Add date and time to command line
|
|
USE_DATETIME = strtobool(os.getenv("GTFF_USE_DATETIME", "True"))
|
|
|
|
# Enable interactive matplotlib mode
|
|
USE_ION = strtobool(os.getenv("GTFF_USE_ION", "True"))
|
|
|
|
# Enable watermark in the figures
|
|
USE_WATERMARK = strtobool(os.getenv("GTFF_USE_WATERMARK", "True"))
|
|
|
|
# Enable Prompt Toolkit
|
|
USE_PROMPT_TOOLKIT = strtobool(os.getenv("GTFF_USE_PROMPT_TOOLKIT", "True"))
|
|
|
|
# Enable Prediction features
|
|
ENABLE_PREDICT = strtobool(os.getenv("GTFF_ENABLE_PREDICT", "True"))
|
|
|
|
# Enable plot autoscaling
|
|
USE_PLOT_AUTOSCALING = strtobool(os.getenv("GTFF_USE_PLOT_AUTOSCALING", "False"))
|
|
|
|
# Enable thoughts of the day
|
|
ENABLE_THOUGHTS_DAY = strtobool(os.getenv("GTFF_ENABLE_THOUGHTS_DAY", "False"))
|
|
|
|
# Quick exit for testing
|
|
ENABLE_QUICK_EXIT = strtobool(os.getenv("GTFF_ENABLE_QUICK_EXIT", "False"))
|
|
|
|
# Open report as HTML, otherwise notebook
|
|
OPEN_REPORT_AS_HTML = strtobool(os.getenv("GTFF_OPEN_REPORT_AS_HTML", "True"))
|
|
|
|
# Enable auto print_help when exiting menus
|
|
ENABLE_EXIT_AUTO_HELP = strtobool(os.getenv("GTFF_ENABLE_EXIT_AUTO_HELP", "False"))
|
|
|
|
# Remember contexts during session
|
|
REMEMBER_CONTEXTS = strtobool(os.getenv("GTFF_REMEMBER_CONTEXTS", "True"))
|
|
|
|
# Use the colorful rich terminal
|
|
ENABLE_RICH = strtobool(os.getenv("GTFF_ENABLE_RICH", "True"))
|
|
|
|
# Use the colorful rich terminal
|
|
ENABLE_RICH_PANEL = strtobool(os.getenv("GTFF_ENABLE_RICH_PANEL", "True"))
|
|
|
|
# Check API KEYS before running a command
|
|
ENABLE_CHECK_API = strtobool(os.getenv("GTFF_ENABLE_CHECK_API", "True"))
|