def collect_data_from_stock_dir(self, stock_code): folder = self.base_path + stock_code if not os.path.exists(folder): os.mkdir(folder) else: obj = util.deserialization_object(folder + '/metadata.json') if obj is not None: # use this one as benchmark self.current_stock = obj self.stocks[stock_code] = self.current_stock
def deserialization_stock_data(self): obj = util.deserialization_object(self.base_path + 'stocks.json') if obj is not None: self.stocks = obj