In neomodel, we will create a model for each node label in our graph. A model is a class that will declare the properties that are being attached to a given node label.
We can choose to create StructuredNode or SemiStructuredNode. A StructuredNode will have to declare all properties that can be attached to it. You will not be able to add properties to a node if these properties have not been declared. On the other hand, SemiStructuredNode offers more flexibility.
In this chapter, we will always use StructuredNode since the graph schema will be clear from the beginning. The minimal code to create a User model is as follows:
from neomodel import StructuredNode
class User(StructuredNode):
pass
The next step is to declare the properties for this model.