Neomodantic¶
An extension of the neomodel library that adds support for pydantic models.
The library is fork of neomodel. For the documentation of the original library, see the neomodel documentation.
Installation¶
Install the library from pypi:
pip install neomodantic
Usage¶
The usage is no different from the original neomodel except now StructuredNode and StructuredRel are now can be used as pydantic models.
from neomodantic import StructuredNode, StringProperty
class Person(StructuredNode):
name = StringProperty(unique_index=True)
person = Person.get_or_create(name="John Doe")
print(person.name)
print(person.id)
print(person.model_dump_json())