title: Offload data from faker API to json file
body: <p>from flask import Flask, request, jsonify
  from faker import Faker</p>
  <p>response_list = []</p>
  <p>id = set(range(10000))</p>
  <p>fake = Faker()</p>
  <p>for i in id:</p>
  <pre><code>response = {
          &quot;id&quot;: i,
          &quot;first_name&quot;: fake.first_name(),
          &quot;last_name&quot;: fake.last_name(),
          &quot;date_of_birth&quot; : str(fake.date_of_birth()),
          &quot;phone&quot;: fake.phone_number(),
          &quot;company_name&quot;: fake.company(),
          &quot;company_description&quot;: fake.bs(),
          &quot;job&quot;: fake.job(),
          &quot;email&quot;: fake.email(),
          &quot;user_name&quot;: fake.user_name(),
          &quot;credit_card&quot; : {
          &quot;credit_card_number&quot;: fake.credit_card_number(),
          &quot;credit_card_provider&quot;: fake.credit_card_provider(),
          &quot;credit_card_expire&quot;: fake.credit_card_expire(),
      },
          &quot;address&quot;: {
          &quot;address_street&quot; : fake.street_address(),
          &quot;address_postal&quot; : fake.postcode(),
          &quot;address_country&quot; : fake.country(),
      },
  
  }
  </code></pre>
  <p>response_list.append(response)</p>
  <p>app = Flask(<strong>name</strong>)</p>
  <p>@app.route(&quot;/&quot;, methods=[&quot;POST&quot;, &quot;GET&quot;])
  def index():
  return jsonify(response_list)</p>
  <p>if <strong>name</strong> == '<strong>main</strong>':
  app.run(debug=True, host='0.0.0.0')</p>