def call_est(self, other_args: List[str]):
        """Process est command"""
        parser = argparse.ArgumentParser(
            add_help=False,
            prog="est",
            description=
            """Yearly estimates and quarter earnings/revenues. [Source: Business Insider]""",
        )
        parser.add_argument(
            "--export",
            choices=["csv", "json", "xlsx"],
            default="",
            type=str,
            dest="export",
            help="Export dataframe data to csv,json,xlsx file",
        )
        try:
            ns_parser = parse_known_args_and_warn(parser, other_args)
            if not ns_parser:
                return

            business_insider_view.estimates(
                ticker=self.ticker,
                export=ns_parser.export,
            )

        except Exception as e:
            print(e, "\n")
    def call_est(self, other_args: List[str]):
        """Process est command"""
        parser = argparse.ArgumentParser(
            add_help=False,
            prog="est",
            description=
            """Yearly estimates and quarter earnings/revenues. [Source: Business Insider]""",
        )

        ns_parser = parse_known_args_and_warn(parser, other_args,
                                              EXPORT_ONLY_RAW_DATA_ALLOWED)
        if ns_parser:
            business_insider_view.estimates(
                ticker=self.ticker,
                export=ns_parser.export,
            )
示例#3
0
def test_estimates():
    business_insider_view.estimates(ticker="TSLA", export=None)