@app.route('/edit', methods=['PUT'])
def edit():
    storm_ = app.get_storm()

    try:
        name = request.json['name']
        connection_uri = request.json['connection_uri']
        if 'id_file' in request.json:
            id_file = request.json['id_file']
        else:
            id_file = ''

        user, host, port = parse(connection_uri)
        storm_.edit_entry(name, host, user, port, id_file)
        return response()
    except ValueError as exc:
        return jsonify(message=exc.message), 404
    except (__HOLE__, TypeError):
        return response(status=400)
dataset/ETHPy150Open emre/storm/storm/web.py/edit