Skip to main content

GSQL client for TigerGraph

Project description



install with pip:

pip install pyTigerDriver


from pyTigerDriver import GSQL_Client
from pyTigerDriver import REST_Client

# Example to for localhost without specifying the version
gsql = GSQL_Client("",username="tigergraph",password="tigergraph")

# Example to for localhost with the version specified
gsql = GSQL_Client("",username="tigergraph",password="tigergraph", version="v3_0_5") 

# Example to for the cloud (Note the CACERT Param for  file obatained from )
gsql = GSQL_Client("<Your_instance>", version="v3_0_5",username="tigergraph",password="<you_password>", cacert="certificate.crt")

print("=============================== LOGIN ============================================")
gsql.login()  # Perform login

print("============================== SIMPLE LS ===========================================")
res = gsql.query("ls") 

print("==============================   LIST USERS   ======================================")
res = gsql.query("SHOW USER")

print("==============================   Create a Secret   ======================================")

res = gsql.query("USE GRAPH MyGraph") # change MyGraph --> to your graph
res = gsql.query("create secret  mys") # Create a secret

print("==============================   Get Secrets   ======================================")
res = gsql.get_secrets("MyGraph")

print("================================  SHOW SECRET  =======================================")
res = gsql.query("SHOW SECRET")
print("=============================== Print Version =========================================")

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyTigerDriver-1.0.2.tar.gz (8.9 kB view hashes)

Uploaded Source

Built Distribution

pyTigerDriver-1.0.2-py3-none-any.whl (10.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page