Janusgraph: Python 3.5 support for querying a JanusGraph graph?

Created on 15 Jan 2017  Â·  5Comments  Â·  Source: JanusGraph/janusgraph

Lovely project that will hopefully carry on the great work Titan has started. However, are you guys planning on releasing Python drivers to be able to query intuitively a JanusGraph graph?

Most helpful comment

This will be fixed by https://github.com/JanusGraph/janusgraph/pull/509

On Wed, Sep 13, 2017 at 04:17 dag4202 notifications@github.com wrote:

If you decide to use gremlin-python, ensure that you set the serializer to
GraphSONSeralizersV2d0 on remote connection.
Assuming the gremlin-server's hostname is "janus":

from gremlin_python.driver.driver_remote_connection import DriverRemoteConnectionfrom gremlin_python.driver.serializer import GraphSONSerializersV2d0from gremlin_python.structure.graph import Graph

connection = DriverRemoteConnection('ws://janus:8182/gremlin', 'g', message_serializer=GraphSONSerializersV2d0())
g = graph.traversal().withRemote(connection)

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/JanusGraph/janusgraph/issues/42#issuecomment-329093680,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHdXmAVb6KHB9EXgtujXjIlI_bHMqUZks5sh4-PgaJpZM4Lj77i
.

>

Robert Dale

All 5 comments

Take a look at gremlin-python. I haven't used it myself but it looks like you can connect to graphs (at least through gremlin server) and query. Their example shows Python 3.2.3.

You can also try goblin which has been rewritten for 3.5 or gizmo

If you decide to use gremlin-python, ensure that you set the serializer to GraphSONSeralizersV2d0 on remote connection.
Assuming the gremlin-server's hostname is "janus":
```python
from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
from gremlin_python.driver.serializer import GraphSONSerializersV2d0
from gremlin_python.structure.graph import Graph

connection = DriverRemoteConnection('ws://janus:8182/gremlin', 'g', message_serializer=GraphSONSerializersV2d0())
g = graph.traversal().withRemote(connection)
````

This will be fixed by https://github.com/JanusGraph/janusgraph/pull/509

On Wed, Sep 13, 2017 at 04:17 dag4202 notifications@github.com wrote:

If you decide to use gremlin-python, ensure that you set the serializer to
GraphSONSeralizersV2d0 on remote connection.
Assuming the gremlin-server's hostname is "janus":

from gremlin_python.driver.driver_remote_connection import DriverRemoteConnectionfrom gremlin_python.driver.serializer import GraphSONSerializersV2d0from gremlin_python.structure.graph import Graph

connection = DriverRemoteConnection('ws://janus:8182/gremlin', 'g', message_serializer=GraphSONSerializersV2d0())
g = graph.traversal().withRemote(connection)

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/JanusGraph/janusgraph/issues/42#issuecomment-329093680,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHdXmAVb6KHB9EXgtujXjIlI_bHMqUZks5sh4-PgaJpZM4Lj77i
.

>

Robert Dale

Sorry, I didn't understand the issue. This is not fixed by #509 . The documentation link above points to latest which is now TinkerPop 3.3.0. However, you should use the same version of TinkerPop that is supported by JanusGraph. In JanusGraph 0.1.1, that is TinkerPop 3.2.3. In 0.2-SNAPSHOT, it's TP 3.2.6.

@dag4202 I think you are using gremlinpython 3.3.0 which is why you have to set the message_serializer. JanusGraph will be upgraded to TP 3.3 by #435 which should fix that for you.

Was this page helpful?
0 / 5 - 0 ratings