-1

I am creating a meal planner mysql database application. In order to do so, I need to break the instructions of the recipe into different steps (this part is non negotiable)

I need to populate my database with dummy data. What is the best way to get dummy data, for recipe steps eg 'Mix water into batter'?

A sample python script or website would be exceptionally useful.

Thanks

2 Answers2

0

Not sure if you are limited to only Python, but a quick Google search pops up https://github.com/joke2k/faker as a library to create fake data for during development. You could also just easily write your own script to give you some random data, especially since you have specific types of strings you want inserted into your database.

Aaron Rumery
  • 552
  • 2
  • 9
0

There is a PHP library that i use as well for this purpose that works very well. https://github.com/fzaninotto/Faker

<?php
// require the Faker autoloader
require_once '/path/to/Faker/src/autoload.php';
// alternatively, use another PSR-0 compliant autoloader (like the Symfony2 ClassLoader for instance)

// use the factory to create a Faker\Generator instance
$faker = Faker\Factory::create();

// generate data by accessing properties
echo $faker->name;
  // 'Lucy Cechtelar';
echo $faker->address;
  // "426 Jordy Lodge
  // Cartwrightshire, SC 88120-6700"
echo $faker->text;
  // Dolores sit sint laboriosam dolorem culpa et autem. Beatae nam sunt fugit
  // et sit et mollitia sed.
  // Fuga deserunt tempora facere magni omnis. Omnis quia temporibus laudantium
  // sit minima sint.
max234435
  • 587
  • 5
  • 18
  • I mostly see it for random sentences or one word things like name. Could you elaborate more on how I could use faker for this please? – ProblemChild Mar 30 '18 at 22:42
  • I have edited my answer above to show you how to use it for your project with things like name or populating text. Hope that helps. Also take a look at their documentation its very straight forward and easy to understand – max234435 Apr 01 '18 at 20:46