Change Password

Please enter the password.
Please enter the password. Between 8-64 characters. Not identical to your email address. Contain at least 3 of: uppercase, lowercase, numbers, and special characters.
Please enter the password.
Submit

Change Nickname

Current Nickname:
Submit

Apply New License

License Detail

Please complete this required field.

  • Ultipa Graph V4

Standalone

Please complete this required field.

Please complete this required field.

The MAC address of the server you want to deploy.

Please complete this required field.

Please complete this required field.

Cancel
Apply
ID
Product
Status
Cores
Applied Validity Period(days)
Effective Date
Excpired Date
Mac Address
Apply Comment
Review Comment
Close
Profile
  • Full Name:
  • Phone:
  • Company:
  • Company Email:
  • Country:
  • Language:
Change Password
Apply

You have no license application record.

Apply
Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

Product Created On ID Amount (USD) Invoice
Product Created On ID Amount (USD) Invoice

No Invoice

v5.0
Search
    English
    v5.0

      Database Connection

      Once you have installed the driver and set up an Ultipa instance, you can connect your application to the database.

      You can establish a connection using the configurations from the UltipaConfig class. See the UltipaConfig Parameters.

      Creating the Connection

      Creates a connection using the NewConnection method of the Connection class:

      from ultipa import Connection, UltipaConfig
      
      ultipaConfig = UltipaConfig()
      # URI example: ultipaConfig.hosts = ["https://mqj4zouys.us-east-1.cloud.ultipa.com:60010"]
      ultipaConfig.hosts = ["192.168.1.85:60061", "192.168.1.87:60061", "192.168.1.88:60061"]
      ultipaConfig.username = "<username>"
      ultipaConfig.password = "<password>"
      
      Conn = Connection.NewConnection(defaultConfig=ultipaConfig)
      
      # Tests the connection: The connection is successfully established if the code is 0
      response = Conn.test()
      print("Code =", response.status.code)
      

      Code = 0
      

      Using Configuration File

      This example demonstrates how to use the configuration file .env to establish a connection:

      import os
      from pathlib import Path
      from dotenv import dotenv_values, load_dotenv
      from ultipa import Connection, UltipaConfig
      
      # Loads the .env file and overrides system environment variables
      env_path = Path('./.env')
      env_dict = dotenv_values(dotenv_path=env_path)
      load_dotenv(encoding='utf-8', override=True)
      
      hosts = os.getenv("hosts").split(",")
      username = os.getenv("username")
      password = os.getenv("password")
      
      ultipaConfig = UltipaConfig(hosts=hosts, username=username, password=password, heartBeat=10)
      Conn = Connection.NewConnection(defaultConfig=ultipaConfig)
      
      response = Conn.test()
      # The connection is successfully established if the code is 0
      print("Code =", response.status.code)
      

      Code = 0
      

      Example of the .env file:

      #hosts=https://mqj4zouys.us-east-1.cloud.ultipa.com:60010
      hosts=192.168.1.85:60061,192.168.1.86:60061,192.168.1.87:60061
      username=<username>
      password=<password>
      passwordEncrypt=PasswordEncrypt.MD5
      defaultGraph=miniCircle
      #crt=F:\\ultipa.crt
      #maxRecvSize=10240
      

      UltipaConfig Parameters

      The UltipaConfig class has the following parameters:

      Parameter
      Type
      Default
      Description
      hosts List[str] / Required. A comma-separated list of database server IPs or URLs. If a URL does not start with https:// or http://, http:// is prefixed by default.
      username str / Required. Username of the host authentication.
      password str / Required. Password of the host authentication.
      defaultGraph str / Name of the graph to use by default in the database.
      crt str / The file path of the SSL certificate used for secure connections.
      passwordEncrypt PasswordEncrypt PasswordEncrypt.MD5 Password encryption method of the driver. Supports MD5, LDAP and NOTHING.
      timeout int 15 Connection timeout threshold (in second).
      heartBeat int 0 The heartbeat interval (in millisecond), used to keep the connection alive. Set to 0 to disable.
      maxRecvSize int 32 The maximum size (in MB) of the received data.
      debug bool False Whether to use the debug mode.
      Please complete the following information to download this book
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写