code: def energy_data():
      
      cur = db.cursor().execute("""SELECT timestamp, current FROM Readings""")
      original = TimeSeries()
      original.initialize_from_sql_cursor(cur)
      original.normalize("day", fusionMethod = "sum")
      return itty.Response(json.dumps(original, cls=PycastEncoder), content_type='application/json')
docs: Connects to the database and loads Readings for device 8.