'Return this most recent APIKey for this user or None if none have been created.'

def valid_api_key(self, user):

    query = self.session().query(model.APIKeys).filter_by(user=user).order_by(sqlalchemy.desc(model.APIKeys.create_time))
    all = query.all()
    if len(all):
        return all[0]
    return None
