This file contains hidden or 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
from tornado import gen | |
from tornado.ioloop import IOLoop | |
from goblin import properties, connection | |
from goblin.models import Vertex, Edge, V | |
class Device(Vertex): | |
serialNumber = properties.String() | |
latitude = properties.Double() | |
longitude = properties.Double() |
This file contains hidden or 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
from goblin import api | |
from goblin import properties | |
class TestVertexProperty(api.VertexProperty): | |
notes = properties.Property(properties.String) | |
class TestVertex(api.Vertex): | |
__label__ = 'test_vertex' |
This file contains hidden or 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
from gremlin_python.structure import RemoteGraph | |
from gremlin_python.driver.rest_remote_connection import RESTRemoteConnection | |
rc = RESTRemoteConnection('ws://localhost:8182', 'g') | |
graph = RemoteGraph(rc) | |
g = graph.traversal() | |
for x in g.V(): | |
print(x) |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?><testsuite errors="0" failures="0" name="pytest" skips="0" tests="91" time="7.217"><testcase classname="tests.test_app" file="tests/test_app.py" line="23" name="test_registry" time="0.055725812911987305"></testcase><testcase classname="tests.test_app" file="tests/test_app.py" line="34" name="test_registry_defaults" time="0.045771121978759766"></testcase><testcase classname="tests.test_app" file="tests/test_app.py" line="42" name="test_transaction_discovery" time="0.04336738586425781"></testcase><testcase classname="tests.test_app" file="tests/test_app.py" line="47" name="test_translator" time="0.04281353950500488"></testcase><testcase classname="tests.test_config" file="tests/test_config.py" line="23" name="test_cluster_default_config" time="0.0010075569152832031"></testcase><testcase classname="tests.test_config" file="tests/test_config.py" line="34" name="test_app_default_config" time="0.043279170989990234"></testcase><testcase classname="tests.test_config" file="tests/ |
This file contains hidden or 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
[INFO] Executing tasks | |
main: | |
[exec] running pytest | |
[exec] Searching for tornado==4.4.1 | |
[exec] Reading https://pypi.python.org/simple/tornado/ | |
[exec] Best match: tornado 4.4.1 | |
[exec] Downloading https://pypi.python.org/packages/96/5d/ff472313e8f337d5acda5d56e6ea79a43583cc8771b34c85a1f458e197c3/tornado-4.4.1.tar.gz#md5=fff8a7d7f580b04bacc2ffe7ddf41133 | |
[exec] Processing tornado-4.4.1.tar.gz | |
[exec] Writing /tmp/easy_install-HmS6zn/tornado-4.4.1/setup.cfg |
This file contains hidden or 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
------------------------------------------------------- | |
T E S T S | |
------------------------------------------------------- | |
Running org.apache.tinkerpop.gremlin.python.structure.io.graphson.GraphSONReaderTest | |
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.019 sec - in org.apache.tinkerpop.gremlin.python.structure.io.graphson.GraphSONReaderTest | |
Running org.apache.tinkerpop.gremlin.python.structure.io.graphson.GraphSONWriterTest | |
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.133 sec - in org.apache.tinkerpop.gremlin.python.structure.io.graphson.GraphSONWriterTest | |
Running org.apache.tinkerpop.gremlin.python.jsr223.PythonProcessStandardTest | |
Tests run: 569, Failures: 0, Errors: 0, Skipped: 44, Time elapsed: 13.2 sec - in org.apache.tinkerpop.gremlin.python.jsr223.PythonProcessStandardTest | |
Running org.apache.tinkerpop.gremlin.python.jsr223.PythonProcessComputerTest |
This file contains hidden or 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
b'\x10application/json{"processor": "", "op": "eval", "args": {"aliases": {}, "gremlin": "graph.features().graph().supportsTransactions()"}, "requestId": "2f52dced-0c4d-4ccd-a8a6-62a59bbb52af"}' |
This file contains hidden or 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
import asyncio | |
import uvloop | |
from aiohttp import ClientSession | |
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) | |
msg = b'\x10application/json{"processor": "", "op": "eval", "args": {"aliases": {}, "gremlin": "x + x", "bindings": {"x": 1}}, "requestId": "2f52dced-0c4d-4ccd-a8a6-62a59bbb52af"}' | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
### REQUEST MESSAGE ### | |
b'!application/vnd.gremlin-v1.0+json{"args": {"gremlin": "1 + 1"}, "requestId": "043f969b-c1b9-4e7d-a6e5-0fac658b9b3e", "processor": "", "op": "eval"}' | |
### SERVER RESPONSE ### | |
{ | |
'requestId': None, | |
'status': { | |
'attributes': { | |
'@class': 'java.util.Collections$EmptyMap' |