0

I need to use the cypher.execute to build a database in python for neo4j with py2neo. But my jupyther (ipython notebook) is not recognizing the << >> characters in this statement. is there an alternative?

cypher.execute("CREATE (a {name:{a}})-[:«rel»]->(b:«labels» {name:{b}})",
               a="Alice", rel="KNOWS", labels=["Human Being", "Employee"], b="Bob")
Nicky Feller
  • 3,539
  • 9
  • 37
  • 54
  • What do you mean by 'not recognizing'? Can't you just leave them out? – Martin Preusse Nov 01 '15 at 14:22
  • @MartinPreusse I am not sure one can substitute the node label or some other bits of the cypher query using the normal means. See the bottom of the first section here: http://py2neo.org/2.0/cypher.html – Tony Ennis Dec 15 '15 at 19:32

0 Answers0