cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How can I run python program connected to neo4j desktop (local database) through google colaboratory

How can I run python program connected to neo4j desktop (local database) through google colaboratory -

3 REPLIES 3

Hello! Unfortunately, a cloud environment would not be able to find a local database (because of the localhost address). However, you can spin up a Neo4j Sandbox instance (cloud-hosted) and connect your Python program in Google Colaboratory to that. Hope this helps!

Cheers,
Jennifer

William_Lyon
Graph Fellow

Another option might be to try the ngrok tool. ngrok allows you to create a public url that is proxied to localhost on your local machine.

So if you proxy localhost port 7687 with ngrok you should then have a public url for your local Neo4j instance that you can use to connect with the Python driver in the hosted Colab notebook.

ngrok tcp 7687

Hi there, I ran into this same problem and tried using ngrok as you suggest, unfortunately it seems the tcp URI scheme is not supported as I got the following error:

Failed to create the driver: URI scheme 'tcp' is not supported. Supported URI schemes are ['bolt', 'bolt+ssc', 'bolt+s', 'neo4j', 'neo4j+ssc', 'neo4j+s']. Examples: bolt://host[:port] or neo4j://host[:port][?routing_context]

I'm looking into other options now but if you have any suggestions for how to tunnel to the accepted URIs, I'm all ears!