This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# start GremlinServer | |
# bin/gremlin-server.sh -i org.apache.tinkerpop gremlin-python 3.2.2-SNAPSHOT | |
# bin/gremlin-server.sh conf/gremlin-server-modern-py.yaml | |
from gremlin_python.process.graph_traversal import GraphTraversal | |
from gremlin_python.process.graph_traversal import GraphTraversalSource | |
from gremlin_python.process.graph_traversal import __ | |
from gremlin_python.process.traversal import Operator | |
from gremlin_python.structure.io.graphson import GraphSONReader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys, yaml, json | |
def funcparse(loader, node): | |
node.value = { | |
yaml.constructor.ScalarNode: loader.construct_scalar, | |
yaml.constructor.SequenceNode: loader.construct_sequence, | |
yaml.constructor.MappingNode: loader.construct_mapping, | |
}[type(node)](node) | |
node.tag = node.tag.replace(u'!Ref', 'Ref').replace(u'!', u'Fn::') |