[Feature] Improved cached results (#6506)

* flag to store cached results, or not

* using keys to reference obbjects in the registry and data processing commands

* out of bonds check

* controlling results, by index or key and displaying charts

* autocompletion

* deps

* forward ref

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
This commit is contained in:
Henrique Joaquim
2024-06-18 15:19:39 +01:00
committed by GitHub
parent 5c79635da2
commit fdfacc8363
10 changed files with 321 additions and 191 deletions

View File

@@ -17,6 +17,7 @@ from typing import Any, Dict, List, Optional
import pandas as pd
import requests
from openbb import obb
from openbb_cli.config import constants
from openbb_cli.config.constants import (
ASSETS_DIRECTORY,
@@ -46,8 +47,6 @@ from prompt_toolkit.formatted_text import HTML
from prompt_toolkit.styles import Style
from pydantic import BaseModel
from openbb import obb
PLATFORM_ROUTERS = {
d: "menu" if not isinstance(getattr(obb, d), BaseModel) else "command"
for d in dir(obb)
@@ -203,7 +202,14 @@ class CLIController(BaseController):
"-h": "--help",
}
choices["stop"] = {"--help": None, "-h": "--help"}
choices["results"] = {"--help": None, "-h": "--help"}
choices["results"] = {
"--help": None,
"-h": "--help",
"--export": None,
"--index": None,
"--key": None,
"--chart": None,
}
self.update_completer(choices)