GSQL client for TigerGraph
Project description
pyTigerDriver
Installation
install with pip:
pip install pyTigerDriver
Usage
from pyTigerDriver import GSQL_Client
from pyTigerDriver import REST_Client
# Example to for localhost without specifying the version
gsql = GSQL_Client("127.0.0.1",username="tigergraph",password="tigergraph")
# Example to for localhost with the version specified
gsql = GSQL_Client("127.0.0.1",username="tigergraph",password="tigergraph", version="v3_0_5")
# Example to for the cloud (Note the CACERT Param for tgcloud.io file obatained from https://raw.githubusercontent.com/Zrouga-Mohamed/utilities/master/certificate.crt )
gsql = GSQL_Client("<Your_instance>.tgcloud.io", 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 =========================================")
gsql.version()
Project details
Release history Release notifications | RSS feed
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.tar.gz
(7.9 kB
view details)
File details
Details for the file pyTigerDriver-1.0.tar.gz.
File metadata
- Download URL: pyTigerDriver-1.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.4.2 requests/2.23.0 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a5801d0a2f94d5253a8e6b60db4e25785f40e7b6af9e7ac0ec2e3b46b6bd712
|
|
| MD5 |
804147516a7604f2a6292626df5beda6
|
|
| BLAKE2b-256 |
f8ab01a97569c2cec7bf1270069b54b7b46bea0a53889244c8b30ac5106137b1
|