title: Flask Python reloading object multiple times
body: <p>I have a flask app that gets a json file and loads it into memory, then displays the data to the end user.  Every time that I hit refresh or navigate through the site, the fetch data occurs again.  Thus, reloading n results into lists.  Example, if there were 5 services, then there would be 10 on the next reload, 15 on the next, etc.  How can I make it where the object is destroyed on page exit?</p>
  
  <pre><code>@app.route("/")
  def index():
      from organization import Organization
      print("run the loop")
      content = Organization()
  
      return render_template('index.html', content=content)
  </code></pre>
  
  <p>This is the class</p>
  
  <pre><code>class Organization:
  
  services = []
  
  def __init__(self, *args, **kwargs):
  
      base_url = 'url'
      domain = 'xyz.com'
  
      r = requests.get(url=base_url + domain)
      organization = json.loads(r.text)
  
      for s in organization['_service_benefit']:
  
         self.services[s['service_id']].append(ServiceBenefit(s_headline = s['headline'], s_content = s['content'], s_service_id=s['service_id']))
  </code></pre>