In this recipe, we will learn how to map the Python object model to the Neo4j graph database server.
Neomodel is an excellent binding module used for mapping an object model to the Neo4j graph database, thinking in terms of objects and further enhancing properties, relationships, and so on.
Neomodel can be installed from both via
$ pip install neomodel $ easy_install neomodel
Now, set the location of Neo4j via the environment variable:
Let's create our first relationship model using Neomodel, as shown in the following code:
from neomodel import (StructuredNode, StringProperty, IntegerProperty,RelationshipTo, ...