Questions tagged [neomodel]

neomodel is a python Object Graph Mapper (OGM) for the neo4j graph database.

neomodel is an Object Graph Mapper (OGM) for the neo4j graph database, built on the awesome neo4j_driver. It is written in python.

97 questions
1
vote
0 answers

CypherSyntaxError:The old parameter syntax `{param}` is no longer supported. Please use `$param` instead. in noemodel v4.0.1 not in neo4j v4.1

This issue is resolved in neo4j v4.1 update. But my question is related to neomodel v4.0.1. How do we resolve this issue in neomodel v4.0.1. My queries: I have models.py as from neomodel import StructuredNode, StringProperty,…
patilkrunal
  • 384
  • 1
  • 4
  • 14
1
vote
1 answer

ImportError: cannot import name 'CypherError' from 'neo4j.v1' (/usr/local/lib/python3.7/site-packages/neo4j/v1/__init__.py)

I am trying to connect a graph base to a project tiangolo/full-stack-fastapi-postgresql. But every time I come across an import error. Please tell me, maybe someone faced a similar problem. Backend launch log: Checking for script in…
1
vote
1 answer

Neomodel Class Definition

I'm having real issues figuring out how to setup Neomodel to work. I have defined my classes in a models.py and I'm importing them but all I ever get is a... ClassAlreadyDefined: Class models.Album with labels Album already defined:…
Trevor Fox
  • 31
  • 2
1
vote
1 answer

How to filter neomodel nodes by their attributes after traversal?

I have the following neo4j models with a Document and Text relationship, where multiple texts are linked to a document : class Document(StructuredNode): """Document Neo4J model for documents""" document_id = IntegerProperty(required =…
Anshuman Tiwari
  • 424
  • 9
  • 19
1
vote
0 answers

Is there a neomodel way of traversing a path given the root node?

I am trying to extract a path but using neomodel without raw cypher How would u implement the equivalent of MATCH (n:node_class {reference: 'some_root_node_id'})-[:relationship*0..]-(m:node_class) SET m.property=n.property but in Neomodel code,…
1
vote
2 answers

Close DB connection with Neomodel

I'm using the Neomodel lib and I can't find anything in the documentation to properly close the connection to the DB. Have I missed something or is there a way to access the underlying connection and close that? When existing the python program an…
StefanE
  • 7,578
  • 10
  • 48
  • 75
1
vote
2 answers

Delete relationship between neo4j nodes using relationship_id, in neomodel

I have neo4j node and relationship schema in neomodel as given below. Now I need to create a function so that it takes the uid of the PersonRel and delete the relationship between the two persons connected by this relationship. I couldn't find it in…
Kshitij Mittal
  • 2,698
  • 3
  • 25
  • 40
1
vote
1 answer

How does neomodel in python connects neo4j db without db name?

I am just starting with neo4j database. I am using neomodel in Python, to connect with neo4j. For this, I created a new database with name "kat" and gave it a password - "password". After running the following code, I am able to create a new person…
Kshitij Mittal
  • 2,698
  • 3
  • 25
  • 40
1
vote
1 answer

Flask and neomodel: ModelDefinitionMismatch

I am getting a neomodel.exceptions.ModelDefinitionMismatch while trying to build a simple Flask app connected to the bold port of Neo4J. import json from flask import Flask, jsonify, request from neomodel import StringProperty, StructuredNode,…
Joost Döbken
  • 3,450
  • 2
  • 35
  • 79
1
vote
1 answer

Problem with 'Overriding the StructuredNode constructor'

I'm getting this error when trying to override the StructuredNode constructor, while it is almost exact same code from the doc. Traceback (most recent call last): File "/Users/xiao/PycharmProjects/Fooga_New/test/tmp.py", line 48, in
Xiao Yi
  • 11
  • 3
1
vote
1 answer

How does the neo4j browser draw the object relationships?

When I run a query such as match (n) return n all of the nodes are returned, however, the relationships and how the nodes are connected does not appear to be in the response data. However, the graph manages to draw the full data model with…
Andrew Gill
  • 361
  • 1
  • 14
1
vote
0 answers

Neomodel filter on relationship

I'm having trouble figuring out the most efficient way to filter a Neomodel NodeSet based on a relationship. I have a class Patient that has a relationship GENDER that points to a node with the label Gender. My classes looks like this: Class…
John
  • 118
  • 3
  • 11
1
vote
0 answers

Django formset for models without foreign key

I'm trying to use formset to create connections between my Neo4j nodes. These models have been constructed using the django-neomodel package. They aren't related using foreign keys, but since this isn't an inline formset that shouldn't matter,…
Kermit
  • 4,922
  • 4
  • 42
  • 74
1
vote
0 answers

Using neomodel to generate JSON for graph visualisation in Javascript

I'm using neomodel in a django app to query Neo4j. Everything is fine but I can't figure out how to get a full path to be generated so that I can use d3 to visualise part of the graph in javascript - so ideally I need this in JSON. I can get a list…
Steve Gailey
  • 129
  • 1
  • 10
1
vote
3 answers

Django testing of neo4j database

I'm using django with neo4j as database and noemodel as OGM. How do I test it? When I run python3 manage.py test all the changes, my tests make are left. And also how do I make two databases, one for testing, another for working in production and…
Taygrim
  • 379
  • 2
  • 3
  • 14