Change Password

Input error
Input error
Input error
Submit

Change Nickname

Current Nickname:
Submit
v2.x

Server Connection and Authentication

DefaultConfig

Properties Type Description
timeoutWithSeconds int Timeout threshold, 15s be default
graphSetName str The name of graphset, 'default' if not configured
responseWithRequestInfo bool To return with the requested information; False by default
readModeNonConsistency bool Inconsistency when read mode; False by default
uqlLoggerConfig LoggerConfig logger configuration, and the manual instantiation is required; None by default

2.1 User Authentication

  • Authentication requires users to provide username, password and the file path of CA certificate when establishing connection with Server:

    from ultipa import Connection
    conn=Connection(host='host:port', username="root", password="root", 
                    			crtFilePath="./ultipa.crt")
    

2.2 Use cases

  • For non-cluster deployment, obtain the connection object through Connection after the authentication is passed:

    from ultipa import Connection
    conn = Connection(host='host:port', username="root", password="root")
    ret = conn.test()
    print(ret)
    # If ret is True, it means Ultipa Server is successfully connected
    # The default graphset is used
    
  • For cluster deployment, the connection object is obtained through Connection.GetConnection:

    from ultipa import Connection
    conn = Connection.GetConnection(
      hosts=['host:port','host:port','host:port'],
      username="root", password="root")
    ret = conn.test()
    print(ret)
    
  • To switch graphset:

    from ultipa import Connection,DefaultConfig
    # 1 Specify the desired graphset before establishing server connection:
    default = DefaultConfig(graphSetName='a')
    conn = Connection(host='host:port', username="root", 
                      password="root",defaultConfig=default)
    # 2 Or modify the graphset after obtaining the connction object:
    # conn.defaultConfig.graphName='a'
    # 3 Or, pass in Common object when a method is called:
    # conn.searchNode(ULTIPA_REQUEST.SearchNode(limit=10),
    #             ULTIPA_REQUEST.Common(graphSetName='a'))
    ret = conn.test()
    print(ret)
    
Please complete the following information to download this book
*
公司名称不能为空
*
公司邮箱必须填写
*
你的名字必须填写
*
你的电话必须填写
*
你的电话必须填写