Skip to content

Commit 25e14d8

Browse files
committed
Deploying to master from @ JanusGraph/janusgraph@5366ccc 🚀
1 parent 18f3af7 commit 25e14d8

11 files changed

Lines changed: 30 additions & 7 deletions

File tree

master/basics/connecting/python/index.html

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,8 @@
573573
</li>
574574

575575
<li class="md-nav__item">
576-
<a href="#janusgraph-specific-types-and-predicates" class="md-nav__link">
577-
JanusGraph Specific Types and Predicates
576+
<a href="#janusgraph-python-for-janusgraph-specific-types-and-predicates" class="md-nav__link">
577+
JanusGraph-Python for JanusGraph Specific Types and Predicates
578578
</a>
579579

580580
</li>
@@ -2014,8 +2014,8 @@
20142014
</li>
20152015

20162016
<li class="md-nav__item">
2017-
<a href="#janusgraph-specific-types-and-predicates" class="md-nav__link">
2018-
JanusGraph Specific Types and Predicates
2017+
<a href="#janusgraph-python-for-janusgraph-specific-types-and-predicates" class="md-nav__link">
2018+
JanusGraph-Python for JanusGraph Specific Types and Predicates
20192019
</a>
20202020

20212021
</li>
@@ -2085,10 +2085,33 @@ <h2 id="getting-started-with-janusgraph-and-gremlin-python">Getting Started with
20852085
Gremlin Server and returns a single result.</p>
20862086
</li>
20872087
</ol>
2088-
<h2 id="janusgraph-specific-types-and-predicates">JanusGraph Specific Types and Predicates</h2>
2088+
<h2 id="janusgraph-python-for-janusgraph-specific-types-and-predicates">JanusGraph-Python for JanusGraph Specific Types and Predicates</h2>
20892089
<p>JanusGraph contains some types and <a href="../../search-predicates/">predicates</a> that
20902090
are not part of Apache TinkerPop and are therefore also not supported by
2091-
Gremlin-Python.</p>
2091+
Gremlin-Python.
2092+
<a href="https://github.com/JanusGraph/janusgraph-python">JanusGraph-Python</a> is a Python
2093+
package that adds support for some of these types and predicates to Gremlin-Python.</p>
2094+
<p>After installing the package, a message serializer needs to be configured for
2095+
JanusGraph which can be done like this for GraphSON 3:</p>
2096+
<div class="highlight"><pre><span></span><code><span class="kn">from</span> <span class="nn">gremlin_python.driver.driver_remote_connection</span> <span class="kn">import</span> <span class="n">DriverRemoteConnection</span>
2097+
<span class="kn">from</span> <span class="nn">janusgraph_python.driver.serializer</span> <span class="kn">import</span> <span class="n">JanusGraphSONSerializersV3d0</span>
2098+
2099+
<span class="n">connection</span> <span class="o">=</span> <span class="n">DriverRemoteConnection</span><span class="p">(</span>
2100+
<span class="s1">&#39;ws://localhost:8182/gremlin&#39;</span><span class="p">,</span> <span class="s1">&#39;g&#39;</span><span class="p">,</span>
2101+
<span class="n">message_serializer</span><span class="o">=</span><span class="n">JanusGraphSONSerializersV3d0</span><span class="p">())</span>
2102+
</code></pre></div>
2103+
<p>or like this for GraphBinary:</p>
2104+
<div class="highlight"><pre><span></span><code><span class="kn">from</span> <span class="nn">gremlin_python.driver.driver_remote_connection</span> <span class="kn">import</span> <span class="n">DriverRemoteConnection</span>
2105+
<span class="kn">from</span> <span class="nn">janusgraph_python.driver.serializer</span> <span class="kn">import</span> <span class="n">JanusGraphBinarySerializersV1</span>
2106+
2107+
<span class="n">connection</span> <span class="o">=</span> <span class="n">DriverRemoteConnection</span><span class="p">(</span>
2108+
<span class="s1">&#39;ws://localhost:8182/gremlin&#39;</span><span class="p">,</span> <span class="s1">&#39;g&#39;</span><span class="p">,</span>
2109+
<span class="n">message_serializer</span><span class="o">=</span><span class="n">JanusGraphBinarySerializersV1</span><span class="p">())</span>
2110+
</code></pre></div>
2111+
<p>Refer to <a href="https://github.com/JanusGraph/janusgraph-python#janusgraph-python">the documentation of JanusGraph-Python</a>
2112+
for more information about the package, including its <a href="https://github.com/JanusGraph/janusgraph-python#version-compatibility">compatibility with
2113+
different JanusGraph versions</a>
2114+
and differences in support between the different <a href="https://github.com/JanusGraph/janusgraph-python#serialization-formats">serialization formats</a>.</p>
20922115

20932116

20942117

master/search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

master/sitemap.xml.gz

0 Bytes
Binary file not shown.

sitemap.xml.gz

0 Bytes
Binary file not shown.

v0.2/sitemap.xml.gz

0 Bytes
Binary file not shown.

v0.3/sitemap.xml.gz

0 Bytes
Binary file not shown.

v0.4/sitemap.xml.gz

0 Bytes
Binary file not shown.

v0.5/sitemap.xml.gz

0 Bytes
Binary file not shown.

v0.6/sitemap.xml.gz

0 Bytes
Binary file not shown.

v1.0/sitemap.xml.gz

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)