Neo4j and django models Neo4j and django models django django

Neo4j and django models


We've been working on updating the Neo4j/Django integration to work with neo4j-rest-client - the fruits of our labor are on GitHub, with some quick comments on my blog.

There are some pros and cons to our integration. The most obviously impacting is our use of a REST client- you get to use a remote database, while losing quite a bit, performance-wise. OTOH, the integration works alongside a relational database, so you can still use django.contrib stuff that relies on the original ORM, and it handles indexing and query sets pretty nicely.

To do what you want above using neo4django, you'd simply get the neo4j-rest-client based node from the model instance, and have at it.

model_instance.node['newProperty'] = 'something'

We're still cranking on making the integration more dynamic, supporting traversals/etc in a Pythonic way, and (currently most important) improving the performance. If you're interested, I'd love feedback.


Have you seen Tobias's blog post about Django integration? It's kinda old now, but still relevant. Plus there are examples you can check out too.