def get_food(food_id: int, ): food = mimesis.Food() return { "food_id": food_id, "vegetable": food.vegetable(), "dish": food.dish(), "drink": food.drink(), }
def food(request): return mimesis.Food(request.param)
# products config outfile = config["products"]["outfile"] outsize = config["products"]["total"] # config suppliers n_suppliers = config["suppliers"]["total"] supplier_id_range = list(range(1, n_suppliers + 1)) # data processing config amounts_cpu = config["data_processing"]["amount_in_cpu"] auto_batch = True if config["data_processing"][ "auto_batch_based_in_cpu"] == "True" else False # loading mocking data type food = mimesis.Food(language) person = mimesis.Person(language) dates = mimesis.Datetime(language) code = mimesis.Code(language) # 5 categories categories_prob = common_functions.random_probabilities(1, 5) suppliers_prob = common_functions.random_probabilities(1, n_suppliers) products = [] def generate_products(amount, index_start): # generates products' info # amount: number of products to generate # index_start: from what index starts
def get_random_body(): generator = mimesis.Food() return "Buy our {}! Drink our {}! Fresh {} & {}! Anything at our store!"\ .format(generator.dish(), generator.drink(), generator.fruit(), generator.vegetable())