ultipa.configuration package

Submodules

ultipa.configuration.InsertConfig module

class ultipa.configuration.InsertConfig.InsertConfig(insertType: ~ultipa.structs.InsertType.InsertType, graphName: str = '', timeout: int = 3600, retry: ~ultipa.structs.Retry.Retry = <ultipa.structs.Retry.Retry object>, stream: bool = False, useHost: str | None = None, useMaster: bool = False, CreateNodeIfNotExist: bool = False, timeZone=None, timeZoneOffset=None, **kwargs)[source]

Bases: RequestConfig

Configuration class for the interface of insert operation.

This class provides settings for inserting metadata.

Args:
  • insertType (InsertType): The mode of insert request (NORMAL/UPSERT/OVERWRITE).

  • graphName (str): The name of graphset to use.

  • timeout (int): The timeout for the request in seconds.

  • retry (Retry): The object of Retry configuration classwhen the request fails

  • stream (bool): Whether to return stream

  • useHost (str): The designated host the request will be sent to, or sent to a random host if not set

  • useMaster (bool): Whether to send the request to the leader to guarantee Consistency Read

  • CreateNodeIfNotExist (bool): Whether to create start/end nodes of edge when these nodes do not exist in the graphset

  • timeZone (str): The string of timezone in standard format

  • timeZoneOffset (any): 1, the number of seconds; 2, a 5-character string such as +0700, -0430

ultipa.configuration.RequestConfig module

class ultipa.configuration.RequestConfig.RequestConfig(graphName: str = '', timeout: int = 3600, retry: ~ultipa.structs.Retry.Retry = <ultipa.structs.Retry.Retry object>, stream: bool = False, host: str | None = None, useMaster: bool = False, threadNum: int | None = None, timeZone: str | None = None, timeZoneOffset: any | None = None)[source]

Bases: object

Configuration class for the interface of any non-insert operation.

This class provides settings for all the operations other than inserting metadata.

Args:
  • graphName (str): The name of graphset to use.

  • timeout (int): The timeout for the request in seconds.

  • retry (Retry): The object of Retry configuration class when the request fails

  • stream (bool): Whether to return stream

  • host (str): The designated host the request will be sent to, or sent to a random host if not set

  • useMaster (bool): Whether to send the request to the leader to guarantee Consistency Read

  • threadNum (int): The number of threads used for the request

  • timeZone (str): The string of timezone in standard format

  • timeZoneOffset (any): 1, the number of seconds; 2, a 5-character string such as +0700, -0430

ultipa.configuration.UltipaConfig module

class ultipa.configuration.UltipaConfig.UltipaConfig(hosts=None, username=None, password=None, crtFilePath=None, defaultGraph: str = 'default', timeout: int = 3600, responseWithRequestInfo: bool = False, consistency: bool = False, heartBeat: int = 10, maxRecvSize: int = -1, uqlLoggerConfig: LoggerConfig | None = None, debug: bool = False, timeZone=None, timeZoneOffset=None, **kwargs)[source]

Bases: object

Configuration class used to instantiate Ultipa connection.

This class stores settings for establishing a connection to an Ultipa server. The change of an UltipaConfig object will update the connection it established.

Args:
  • hosts (str): The list of Ultipa server hosts.

  • username (list[str]): The username of server.

  • password (str): The password of server.

  • crtFilePath (str): The file path of SSL certificate when both Ultipa server and client-end are in SSL mode.

  • defaultGraph (str): The name of graphset to use.

  • timeout (int): The timeout for the request in seconds.

  • responseWithRequestInfo (bool): Whether to return request.

  • consistency (bool): Whether to use leader host to guarantee Consistency Read.

  • heartBeat (int): The heartbeat in seconds for all instances, set 0 to turn off heartbeat.

  • maxRecvSize (int): The maximum number of bytes when receiving data.

  • uqlLoggerConfig (LoggerConfig): The object of LoggerConfig class.

  • debug (bool): Whether to use debug mode.

  • timeZone (str): The string of timezone in standard format.

  • timeZoneOffset (any): 1, the number of seconds; 2, a 5-character string such as +0700, -0430.

To enable debug mode, a logger configuration is necessary. If ‘debug’ is set to True but ‘uqlLoggerConfig’ is not defined, a LoggerConfig object will be generated for debugging purposes; however, the log will not be written to a file.

setDefaultGraphName(graph: str)[source]

Module contents