def __init__(self):
        self.daily_data_file_path_currencies = scrape_API.EoddataExchange(
            'currencies').set_daily_data_file_name()

        if os.path.isfile(self.daily_data_file_path_currencies) is False:
            try:
                scrape_API.EoddataExchange('currencies').create_daily_data()
            except:
                print(
                    "no currency symbols data file found.\n initiating symbols data file creation."
                )
                scrape_API.EoddataExchange('currencies').create_symbols_file()

        self.all_currencies_dataframe = stocks_analysis.all_companies_data_frame(
            self.daily_data_file_path_currencies)
    def __init__(self, exchange_name):
        self.daily_data_file_path = scrape_API.EoddataExchange(
            exchange_name).set_daily_data_file_name()
        self.viable_data_column_names = VIABLE_DATA_COLUMN_NAMES

        try:
            if os.path.isfile(self.daily_data_file_path) is False:
                scrape_API.EoddataExchange(exchange_name).create_daily_data()
                print("Created daily data file of market: ", exchange_name)
        except IndexError:
            print(
                "no " + exchange_name +
                " symbols data file found.\n initiating symbols data file creation."
            )
            scrape_API.EoddataExchange(exchange_name).create_symbols_file()
            print("Symbols data file created. Initializing daily data scrape.")
            scrape_API.EoddataExchange(exchange_name).create_daily_data()

        self.all_daily_dataframe = stocks_analysis.all_companies_data_frame(
            self.daily_data_file_path)
def get_market_today_dataframe(market_name):
    market_daily_file_path = scrape_API.EoddataExchange(market_name).set_daily_data_file_name()
    chosen_daily_dataframe = all_companies_data_frame(market_daily_file_path)
    return chosen_daily_dataframe
 def create_symbols_file(self, exchange_name):
     scrape_API.EoddataExchange(exchange_name).create_symbols_file()
 def refresh_daily_data(self):
     exchanges_dict = scrape_API.Eoddata().tab_dict
     for exchange in exchanges_dict:
         scrape_API.EoddataExchange(exchanges_dict[exchange]).create_daily_data()