The simplest way to create a user is by creating an instance of the User class:
u = User(login="me", password="12345")
To save the object, or create it in Neo4j, you just have to call the save method on that instance:
u.save()
If you want to use a MERGE statement instead, you will have to use a slightly different method:
users = User.get_or_create(
dict(
login="me",
password="<3Graphs",
email="[email protected]",
birth_date=date(2000, 1, 1),
),
)
Be careful as the get_or_create method can create several nodes at once (adding more arguments after the first dict) and return a list of nodes.
Now, go ahead and add a few more users to the graph. Once we have some users in the graph, we can retrieve them.