from tools.menu_tools_utils import get_data_store_id from config import settings def data_bifercation(store_id, brand_id): data = get_data_store_id(settings.STORE_ID, settings.BRAND_ID).get("data") category = {} items = {} main_data = [] for cate in data: print("----"*30) for item in cate.get("itemsData"): inner_data = [] inner_data.append(cate.get("name")) inner_data.append(item.get("title")) inner_data.append(item.get("price")) items[item.get("title")] = item.get("_id") main_data.append(inner_data) category[cate.get("name").lower().strip()] = cate.get("_id") print("----"*30) return main_data, category, items