© 2026 Hedgehog Software, LLC
version: '3.8' services: btc_janusgraph: # build: ./janusgraph image: janusgraph/janusgraph:latest container_name: btc_janusgraph environment: janusgraph.set-vertex-id: true ports: - "${JANUSGRAPH_PORT:-8182}:${JANUSGRAPH_PORT:-8182}" networks: - btc-network volumes: - btc_janusgraph_data:/var/lib/janusgraph - "./janusgraph/janusgraph.properties:/etc/opt/janusgraph/janusgraph.properties:ro"
from dotenv import load_dotenv from graph.base import g from gremlin_python import statics from gremlin_python.process.traversal import T from gremlin_python.process.graph_traversal import __ from gremlin_python.process.strategies import * from gremlin_python.process.graph_traversal import GraphTraversalSource from gremlin_python.structure.graph import Graph from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection statics.load_statics(globals()) gremlin_version = tuple([int(x) for x in version('gremlinpython').split('.')]) if (gremlin_version <= (3, 4, 0)): graph = Graph() g = graph.traversal().withRemote(DriverRemoteConnection(GRAPH_DB_URL, 'g')) else: from gremlin_python.process.anonymous_traversal import traversal g = traversal().withRemote(DriverRemoteConnection(GRAPH_DB_URL, 'g', username=GRAPH_DB_USER, password=GRAPH_DB_PASSWORD)) # clear database g.V().drop().iterate() # add vertices g.addV('person').property(T.id, 0).next()
gremlin_python.driver.protocol.GremlinServerError: 500: Vertex does not support user supplied identifiers
graph.set-vertex-id=true graph.allow-custom-vid-types=true
g.addV("person").property(T.id, "1").next()
Join the Discord to ask follow-up questions and connect with the community
Apache TinkerPop is an open source graph computing framework and the home of the Gremlin graph query language.
1,383 Members