TigerGraphConnection

A TigerGraphConnection object provides the HTTP(S) communication used by all other modules.

_init_()

init(host: str = "http://127.0.0.1", graphname: str = "MyGraph", username: str = "tigergraph", password: str = "tigergraph", tgCloud: bool = False, restppPort: Union[int, str] = "9000", gsPort: Union[int, str] = "14240", gsqlVersion: str = "", version: str = "", apiToken: str = "", useCert: bool = True, certPath: str = None, debug: bool = False, sslPort: Union[int, str] = "443", gcp: bool = False)

Initiate a connection object.

Parameters:

  • host: The host name or IP address of the TigerGraph server. Make sure to include the protocol (http:// or https://). If certPath is None and the protocol is https, a self-signed certificate will be used.

  • graphname: The default graph for running queries.

  • username: The username on the TigerGraph server.

  • password: The password for that user.

  • tgCloud: Set to True if using TigerGraph Cloud. (Only needed for new TigerGraph Cloud instances.)

  • restppPort: The port for REST++ queries.

  • gsPort: The port of all other queries.

  • gsqlVersion: The version of the GSQL client to be used. Effectively the version of the database being connected to.

  • version: DEPRECATED; use gsqlVersion().

  • apiToken: DEPRECATED; use getToken() with a secret to get a session token.

  • useCert: DEPRECATED; the need for a CA certificate is now determined by URL scheme.

  • certPath: The filesystem path to the CA certificate. Required in case of https connections.

  • debug: Enable debug messages.

  • sslPort: Port for fetching SSL certificate in case of firewall.

  • gcp: DEPRECATED: Is firewall used?

Raises:

TigerGraphException: In case on invalid URL scheme.