@blueprint.route('/visualize-network', methods=['POST'])
def visualize_network():
 framework = flask.request.args.get('framework')
 if (not framework):
  raise werkzeug.exceptions.BadRequest('framework not provided')
 fw = frameworks.get_framework_by_id(framework)
 ret = fw.get_network_visualization(flask.request.form['custom_network'])
 return ret

@ blueprint . route ( '/visualize-network' , methods = [ 'POST' ] ) def visualize_network ( ) : framework = flask . request . args . get ( 'framework' ) if ( not framework ) : raise werkzeug . exceptions . BadRequest ( 'framework not provided' ) fw = frameworks . get_framework_by_id ( framework ) ret = fw . get_network_visualization ( flask . request . form [ 'custom_network' ] ) return ret
returns a visualization of the custom network as a string of png data .