Skip to main content

pyTigerDriver

Installation

install with pip:

pip install pyTigerDriver

Usage

Architecture: You can instatiate any Interface [GSQL or REST] in the pyTigerDriver seperately.

This flowchart illustrates the Classes:

graph LR
A[pyTigerDriver as tgCl] -- Gsql --> B((Gsql_Client))
A -- Rest --> C((Rest_Client))
B --> D{TigerGraph Database}
C --> D

Sample Code :

import pyTigerDriver as tg


tgCl = tg.Client(server_ip="127.0.0.1",username="tigergraph",password="tigergraph",version="3.0.5")

print("======================== SIMPLE RESTPP Queries ==================================")
print(tgCl.Rest.version())

print("============================== SIMPLE LS ===========================================")
res = tgCl.Gsql.query("ls")
print(res)

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

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

print("==============================   Get Secrets   ======================================")
res = tgCl.Gsql.get_secrets("MyGraph")
print(res)

print("=============================== Print Version =========================================")
print(tgCl.Gsql.version())

Code Linting And Unit Testing

Code Linting :

Linting using PEP8 Standards

user@box:~$ flake8 --exclude=venv* --ignore=E501 --statistics pyTigerDriver/restDriver.py
user@box:~$ flake8 --exclude=venv* --ignore=E501 --statistics pyTigerDriver/pyDriver.py

Running the tests :

run unit tests using pytest :

user@box:~$ pytest -v

CircleCi Work flow :

  1. create a folder named .circleci in the root of the repo
  2. within that folder create a file called config.yml containing the folloing flow :
version: 2.1

orbs:
  python: circleci/python@0.2.1


jobs:
  build-and-test:
    executor: python/default
    steps:
      # Step 1: obtain repo from GitHub
      - checkout
      # Step 2: create virtual env and install dependencies
      - run:
          name: install dependencies
          command: |
            python3 -m venv venv
            . venv/bin/activate
            pip install -r requirements.txt
      # Step 3: run linter and tests
      - run:
          name: run tests
          command: |
            . venv/bin/activate
            flake8 --exclude=venv* --ignore=E501  --statistics pyTigerDriver/pyDriver.py
            flake8 --exclude=venv* --ignore=E501  --statistics pyTigerDriver/restDriver.py
            pytest -v


workflows:
  main:
    jobs:
      - build-and-test

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.7.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyTigerDriver-1.0.7-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file pyTigerDriver-1.0.7.tar.gz.

File metadata

  • Download URL: pyTigerDriver-1.0.7.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for pyTigerDriver-1.0.7.tar.gz
Algorithm Hash digest
SHA256 161bce3c824e7a03943c988b8a091481645e0bd9c5a33f6fa72f42d46f0077ed
MD5 e2a0a530c7c23fd2e7ae78233e037b34
BLAKE2b-256 0bb0ef0891e6348497b4ef1592cd6bb15ad8a0fafff705e3e290c4d9c1552aaf

See more details on using hashes here.

File details

Details for the file pyTigerDriver-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: pyTigerDriver-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for pyTigerDriver-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c799820af37bc19a84791cad10214db3c693e5c5e3f3e6f2a6498cbebafde42a
MD5 90f6c79afebdf4b04c30cc4dc68dbc3b
BLAKE2b-256 67a633f195a78a7e141861cb0bd94601efacbecc3b338c9efd37ddd56c2226b3

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.15

2 files

1.0.14

2 files

1.0.13

2 files

1.0.12

2 files

1.0.11

2 files

1.0.10

2 files

1.0.9

2 files

1.0.8

2 files

This release

1.0.7 This release

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page