Connect a python script to dgraph

Where can I connect a python script to dgraph in the cloud version?

1 Like

Have a look at the python dgraph client: GitHub - dgraph-io/pydgraph: Official Dgraph Python client

You can connect to dgraph cloud like this:

import pydgraph

cloud_address = 'your-secret-uri'

client_stub = pydgraph.DgraphClientStub(cloud_address)
client = pydgraph.DgraphClient(client_stub)
1 Like