Goblin OGM on top of TinkerPop 3

Goblin adds a powerful OGM on top of Tinkerpop 3.

Adding a Vertex
from goblin import Goblin, element, properties
# Object representing a Person vertex
class Person(element.Vertex):
__label__ = 'person'
name = properties.Property(properties.String)
age = properties.Property(properties.Integer)
# Create a database session
app = Goblin.open(
event_loop,
hosts=['localhost'],
port=8182)
session = await app.session()
# create an Object to represent Jon
jon = Person()
jon.name = 'jonathan'
jon.age = 38
# Create the Vertex for Jon in the DB
session.save(jon)
# Close the connection
await app.close()

For Developers

We introspect your Goblin models and generate gremlin) traversals so you can stop building repetitive CRUD APIs and focus on building your products.

Set property defaults and cardinality.
from gremlin_python.process.traversal import Cardinality
class Person(goblin.Vertex):
name = goblin.Property(goblin.String, default='John Doe')
nicknames = goblin.VertexProperty(
goblin.String, card=Cardinality.list_)
david = Person()
david.nicknames = ['Jeff', 'Freemo']