def gen_csv(out, writer, write_user): add_headers(writer) users = get_users_for_report() for user in users: write_user(writer, user) yield out.getvalue()
def gen_json(): users = get_users_for_report() jdata = json.dumps(users) return jdata
def gen_csv(out, writer, write_user): add_headers(writer) users = get_users_for_report() for user in users: write_user(writer, user) yield out.getvalue()
def gen_json(): users = get_users_for_report() jdata = json.dumps(users) return jdata