python graph-tool library with graph database
Question: I would like to use some of the [graph-tool](http://graph-tool.skewed.de/)
functionality with data in a graph database (say neo4j, but any Blueprints
enabled graph DB would be good, see [Tinkerpop](http://www.tinkerpop.com/)
project).

I'm aware of (and have dabbled with some of) py2neo and would like to
investigate [Bulbs](http://bulbflow.com/overview/) as a way to access the
database and project like
[pyBlueprints](https://github.com/escalant3/pyblueprints).

My question is: How do I use graph-tool functions on data in a graph database
(such as neo4j) without exporting the whole graph to graphML (or one of the
exiting graph-tool import formats) etc?

I would like it to be more dynamic than `run query, find a subset of a graph,
export, process with graph-tool, put data back into graph`

I'm aware that Blueprints offers a "to GraphML reader/writer", is this the
solution?


Answer: I think that the workflow you present is probably the best and only one
available to you. You In TinkerPop terms, I would say that the workflow would
be more specifically:

  1. run query - Use the [Gremlin Console](https://github.com/tinkerpop/gremlin/wiki/Getting-Started#using-the-gremlin-console)
  2. find a subset of a graph - Write your traversal in the console and dump the results of it into a subgraph. Use an in-memory TinkerGraph to store that subgraph - read more [here](http://gremlindocs.com/#recipes/subgraphing).
  3. export - call [saveGraphML](http://gremlindocs.com/#methods/graph-save) on your subgraph instance
  4. process with graph-tool - import the GraphML into graph-tool and do what you need to do with it
  5. put data back into graph - I don't know graph-tool and its capabilities, but the Gremlin Console let's you work with data in a variety of ways that makes it pretty easy to shovel data around - read more about that [here](http://thinkaurelius.com/2013/02/04/polyglot-persistence-and-query-with-gremlin/).

