def get_events(self):
    cursor = self.connection.cursor()
    cursor.execute("select datetime(dt,'localtime') as dt, event from events order by dt desc limit 15")
    rows = cursor.fetchall()
    events = []
    if (rows is not None):
        for row in rows:
            event = {}
            for key in row.keys():
                event[key.lower()] = row[key]
            events.append(event)
        cursor.close()
    return events
def get_events(self):
    cursor = self.connection.cursor()
    cursor.execute("select datetime(dt,'localtime') as dt, event from events order by dt desc limit 15")
    rows = cursor.fetchall()
    events = []
    if (rows is not None):
        for row in rows:
            event = {}
            for key in row.keys():
                event[key.lower()] = row[key]
            events.append(event)
        cursor.close()
    return events