def profile(id = None): 
    if id:
        # get specified user
        tmp = jsonify({'response': id})
        resp = flask.make_response(tmp, 200)
        
    else:
        # get all users from database
        all_users = scripts.get_attendees()
        if all_users:
            tmp = jsonify({'response': all_users})
            resp = flask.make_response(tmp, 200)
        else:
            tmp = jsonify({'error': 'Error communicating with database'})
            resp = flask.make_response(tmp, 500)
    return resp
import scripts

print scripts.get_attendees()