djangorestframework with neo4js graph database at backend

53 views
Skip to first unread message

Rajan Chauhan

unread,
Sep 6, 2016, 6:59:49 PM9/6/16
to Django REST framework
I want to inquire whether djangorestframework can be used with neo4js database as backend. I don't have any idea whether Serializers methods avaliable will work with graph database as backend.

Rodney Morison

unread,
Sep 7, 2016, 3:43:24 PM9/7/16
to Django REST framework
I've successfully used DRF to integrate with Elasticsearch, and plan to use it in a similar fashion for a Neo4j backend. Two approaches:
  1. Build a "formal" b/e, using ModelSerializer as a template, with "under the hood" retrieve, create, update, delete. This approach worked for me with ES because it looks more/less like a flat database. (I used a ES integration package called Bungiesearch, which I customized a bit, esp for index retrievals.)
  2. Code up "ad hoc" integration inheriting from the Serializer class. I expect I'll take this approach for Neo, as the query and result model are generally different than table based; my queries will likely be on paths, not nodes.
I hope to write some of this up with code detail later this year, but the project is in mid-dev atm. Short answer: yes, I would definitely use DRF to handle much of the "plumbing", e.g., auth/access, url/resource routing, etc.
Reply all
Reply to author
Forward
0 new messages