title: How to get the response of a cypher query in neo4j using python Rest api
body: <p>I am using Python to access neo4j and create nodes. 
  Before I create the node I want to check if it exists. I run this query:</p>
  
  <pre><code>          "query" : "match (PPnode:Node) return PPnode"
  </code></pre>
  
  <p>And using the method of requests library:  </p>
  
  <pre><code>           r.text
  </code></pre>
  
  <p>I get a string, with the response of my POST request.
  My question is if there is a more "elegant" way to check if there are existing nodes with a specific name using python and rest api.</p>
  
  <p>This is my code:</p>
  
  <pre><code>   import requests
     import json
     import csv
  
    headers = {'content-type': 'application/json'}
    url = "http://localhost:7474/db/data/cypher"
  
  
    fparts = open('FOC.csv')
    csv_pseudo = csv.reader(fparts)
  
  
    for row in csv_pseudo:
  
     # query to check if node exists
     checkNode = {"query" : "match (PPnode:Node) return PPnode"}
     mkr =requests.post(url, data=json.dumps(checkNode), headers=headers)
  </code></pre>
  
  <p>Thanks
  Dimitris</p>