async def addEdges(request):
    logger.debug('Adding Edges')
    client = request.app['arango']
    db = client.db(request.match_info['db_name'], username='root', password=os.environ['MULTINET_ROOT_PASSWORD'])
    graph = db.graph(request.match_info['graph_name'])
    name = request.match_info['name']
    reader = (await request.multipart())
    field = (await reader.next())
    text = (await field.text())
    from_collections = text.split(',')
    field = (await reader.next())
    text = (await field.text())
    to_collections = text.split(',')
    if graph.has_edge_definition(name):
        collection = graph.edge_collection(name)
    else:
        collection = graph.create_edge_definition(edge_collection=name, from_vertex_collections=from_collections, to_vertex_collections=to_collections)
    import_file = (await reader.next())
    filedata = (await import_file.text())
    fileschema = [key.strip('"') for key in filedata.splitlines()[0].split(',')]
    filelines = filedata.splitlines()[1:]
    for line in filelines:
        values = [value.strip('"') for value in line.split(',')]
        doc = {key: value for (key, value) in zip(fileschema, values)}
        try:
            collection.insert(doc)
        except Exception as e:
            logger.info(e)
    return web.Response(text=collection.name)
async def addEdges(request):
    logger.debug('Adding Edges')
    client = request.app['arango']
    db = client.db(request.match_info['db_name'], username='root', password=os.environ['MULTINET_ROOT_PASSWORD'])
    graph = db.graph(request.match_info['graph_name'])
    name = request.match_info['name']
    reader = (await request.multipart())
    field = (await reader.next())
    text = (await field.text())
    from_collections = text.split(',')
    field = (await reader.next())
    text = (await field.text())
    to_collections = text.split(',')
    if graph.has_edge_definition(name):
        collection = graph.edge_collection(name)
    else:
        collection = graph.create_edge_definition(edge_collection=name, from_vertex_collections=from_collections, to_vertex_collections=to_collections)
    import_file = (await reader.next())
    filedata = (await import_file.text())
    fileschema = [key.strip('"') for key in filedata.splitlines()[0].split(',')]
    filelines = filedata.splitlines()[1:]
    for line in filelines:
        values = [value.strip('"') for value in line.split(',')]
        doc = {key: value for (key, value) in zip(fileschema, values)}
        try:
            collection.insert(doc)
        except Exception as e:
            logger.info(e)
    return web.Response(text=collection.name)