title: How to create Gephi network graphs from Python?
body: <p>I have just found out about GephiStreamer. <a href="https://pypi.python.org/pypi/GephiStreamer" rel="noreferrer">https://pypi.python.org/pypi/GephiStreamer</a></p>
  
  <p>Using this package one can send instructions from python to Gephi to create nodes and edges in Gephi.</p>
  
  <pre><code># Create a node with a custom_property
  node_a = graph.Node("A",custom_property=1)
  
  # Create edge 
  edge_ab = graph.Edge(node_a,node_b,custom_property="hello")
  stream.add_edge(edge_ab)
  </code></pre>
  
  <p>Similarly I want to do everything in Gephi through Python. Here is what I typically do.</p>
  
  <p>ex:</p>
  
  <p>steps:</p>
  
  <ol>
  <li><p>load nodes</p></li>
  <li><p>load edges</p></li>
  <li><p>calculate betweeness centrality</p></li>
  <li><p>change the size/color of nodes as per their centrality scores</p></li>
  <li><p>change the graph layout (such as forceatlas2)</p></li>
  <li><p>give the output graph</p></li>
  </ol>
  
  <p>Below is the output I have got manually, but I want to produce the same by sending instructions from python to Gephi. Documentation doesn't tell anything beyond creating nodes, edges and graphs.</p>
  
  <p>I have also found out about NetworKit. <a href="https://networkit.iti.kit.edu/data/uploads/docs/NetworKit-Doc/python/html/gephi.html" rel="noreferrer">https://networkit.iti.kit.edu/data/uploads/docs/NetworKit-Doc/python/html/gephi.html</a></p>
  
  <p>This is slightly better than gephistramer, but this requires python 3.4 or higher and most of the packages like pandas, numpy or sickit are in 2.7.</p>
  
  <p>also Is there a way to send the file I have created in gephi back to python.</p>
  
  <p>Please suggest.</p>
  
  <p>PS: I have edited the entire question details so that it's easier to understand now (hopefully).</p>