Skip to main content
Checkout the Github of the TuringDB Community Version If you want to support TuringDB leave us a star on Github !
1

Install TuringDB Python SDK

Using uv package manager (you will need to create a project first):
uv add turingdb
or using the pip :
pip install turingdb
or using the docker image:If you can it’s better to use TuringDB within a uv project or with pip install to avoid loss in latency performance related to the docker deployment
docker run -it turingdbai/turingdb:nightly turingdb
You can also install TuringDB using cmake: instructions on Github (link)
2

Running TuringDB

If you want to launch TuringDB instantly in the CLI
turingdb
If you want to launch TuringDB in the background as a daemon
turingdb -demon
3

Example 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

# Create TuringDB client
# set host parameter to the URL (as string) on which TuringDB is running,
# default "http://localhost:6666"
client = TuringDB(host="http://localhost:6666")

# Create a new graph called my_graph
client.create_graph("mygraph")

# Set working graph
client.set_graph("mygraph")

# Create a new change on the graph
change = client.new_change()

# 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")

# Checkout back to main
client.checkout()

# Query graph
client.query("MATCH (n) RETURN n")
4

Visualise the graph you have created in TuringDB

TuringDB has a high performance visualiser that you can download here:TuringDB Visualiser

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!