How to connect to Aura with python?

I am an absolute beginner and I am trying to connect to Aura with python , I had luck with sandbox and desktop with bolt://. But i am keep failing with Aura. Any help on connecting to Aura with python(py2neo) would be really appreciated.

This is what I tied.

graph = Graph("neo4j+s://5b5d64a9.databases.neo4j.io:7687", auth=("neo4j", "password****"),routing=True)

1 Like

Hello krishwera, I tested here with my aura instance:

Using py2neo version 2021.1.5

from py2neo import Graph

graph = Graph("neo4j+s://231234.databases.neo4j.io", auth=("neo4j", "PASSWORD"), routing=True)
print(graph.run("MATCH (n) RETURN n"))

It worked without a problem.
Are you sure the password you have is correct?

1 Like

Thank you andreperez for the help.
I updated py2neo to 2021.1.5 version , but it keep failing. :grimacing: Checked the password multiple times.

from py2neo import Graph

graph = Graph("neo4j+s://5b5d64a9.databases.neo4j.io",auth=("neo4j", "password"),routing=True)

I keep getting

What version of python you have?

1 Like

I used the latest python 3.9 release.

1 Like

Hi Andre, It works with python 3.9. thank you so much for bringing that up! Cheers!!

1 Like