Skip to content

Getting Started

To download pyTigerGraph, simply run: pip install pyTigerGraph Once the package installs, you can import it and instantiate a connection to your database:

import pyTigerGraph as tg

conn = tg.TigerGraphConnection(host="<hostname>", graphname="<graph_name>", username="<username>", password="<password>", apiToken="<api_token>")

If your database is not using the standard ports (or they are mapped), you can use the following arguments to specify those: - restppPort (default 9000): REST++ API port - gsPort (default: 14240): GraphStudio port

For example, in case of using a local virtual machine with the ports mapped:

conn = tg.TigerGraphConnection(host="localhost", restppPort=25900, gsPort=25240, graphname="MyGraph", username="tigergraph", password="tigergraph", apiToken="2aa016d747ede9gg6da3drslm98srfoj")

GSQL 101 With pyTigerGraph

Checkout this example for completing the GSQL 101 course in a Jupyter Notebook environment. Through this, you will also learn of various pyTigerGraph methods that you can use.