Connecting to the Hyperspace Server

The following describes how to create a local instance of the Hyperspace client, which will enable you to connect to the database through the Hyperspace API. Hyperspace provides you with a username, password and the address of the cloud machine to which you will connect using the Hyperspace API.

To create a local instance of the Hyperspace client –

Copy the following code snippet to enable a connection to the database through the Hyperspace API.

hyperspace_client = hyperspace.HyperspaceClientApi(host=host_address,
                                                   username=username,
                                                   password=password)

Make the following two modifications before running it -

  • Replace host_address with the address of the Hyperspace cloud machine that you will access. This will be provided to you by Hyperspace.

  • Replace username and password with the user name and password provided to you by Hyperspace.

To check that the client is live, run the following command -

print(hyperspace_client.collections_info())

A status message similar to the following should appear –

[{'Collections size': {'GeneratedData': 0, 'Number of total vectors': 98792}, {'Number of data nodes': 1}]

If no status message appears, contact support for assistance.

Last updated