Skip to main content
1

Install TuringDB

2

Install TuringDB Python SDK

Using pip:
pip install turingdb
or using the uv package manager (you will need to create a project first):
uv add turingdb
3

Exemple to create and query a graph

Create graph → list graph → create node & create edge → commit → list graphs → match query

Python SDK

from turingdb import TuringDB

client = TuringDB()

# Create a new graph
client.query('CREATE GRAPH mygraph')
client.set_graph('mygraph')

# Create a new change on the graph
change = client.query("CHANGE NEW")["Change ID"][0]

# Checkout into the change
client.checkout(change=change)

# Create a node Person (Jane) - Edge (knows) - node (John)
client.query('CREATE (n:Person {Name:"Jane"})-[e:knows]-(m:Person {Name:"John"})')

# Commit the change
client.query("COMMIT")
client.query("CHANGE SUBMIT")
4

Visualise the graph you have created in TuringDB

??

Exemple of a biological interaction graph built in TuringDB:

  1. Choose on the top right the graph
  2. Search & select a node(s) of interest (magnifying glass button on the left)
  3. Then go to visualiser (network logo) and you can start exploring paths, expanding neighbours, inspect nodes (parameters, hyperlinks, and texts stored on the nodes) Graph visualisation
You are done!