Closed arthurk closed 12 years ago
Hi Arthur -
Make sure you enable the Gremlin extension in your rexster.xml:
<extensions>
<allows>
<allow>tp:gremlin</allow>
</allows>
</extensions>
I just tried this on Linux using the 0.2.2 from PyPi:
>>> g = Graph('http://localhost:8182/graphs/neo4jsample')
>>> james = g.vertices.create({'name':'James'})
julie = g.vertices.create({'name':'Julie'})
>>> g.edges.create(james,"knows",julie)
<Edge: http://localhost:8182/graphs/neo4jsample/edges/0>
>>> g.V
[{'_type': 'vertex', '_id': 1, 'name': 'James'}, {'_type': 'vertex', '_id': 2, 'name': 'Julie'}]
You can also view the results in your Web browser:
http://localhost:8182/graphs/neo4jsample
{"version":"0.8-SNAPSHOT","name":"neo4jsample","graph":"neo4jgraph[EmbeddedGraphDatabase [\/tmp\/rexster-graph]]","readOnly":false,"type":"com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph","queryTime":0.446298,"upTime":"0[d]:00[h]:04[m]:46[s]"}
http://localhost:8182/graphs/neo4jsample/vertices
{"version":"0.8-SNAPSHOT","results":[{"name":"James","_id":1,"_type":"vertex"},{"name":"Julie","_id":2,"_type":"vertex"}],"totalSize":2,"queryTime":0.707539}
Bulbs 0.3 is about to be released -- the code is on GitHub master. I'm working on the 0.3 docs, and when they are online, I'll switch PyPi to 0.3.
ah, yes, the gremlin extension wasn't enabled.
Thank you for the fast and helpful response!
When trying to execute the following code:
The following exception is raised:
TypeError: 'NoneType' object is not iterable
I'm using Bulbs 0.2.2, Gremlin 1.5 and Rexster 0.8 with Neo4j as a backend.