The SDK has been tested against Python 2.7.6 and Python 3.6.4.

Install from pip:

pip install rubrik_cdm

Install from source:

$ git clone
$ cd rubrik-sdk-for-python
$ python install


Before you begin to use the Rubrik Python SDK, you should first setup your authentication credentials. By default, the SDK will attempt to read the the Rubrik Cluster credentials from the following environment variables:

  • rubrik_cdm_node_ip

  • rubrik_cdm_username

  • rubrik_cdm_password

  • rubrik_cdm_token

Note: The rubrik_cdm_username and rubrik_cdm_password must be supplied together and may not be provided if the rubrik_cdm_token variable is present


To use the SDK, you must first instantiate a new variable, in thise case rubrik, to connect to the Rubrik Cluster.

import rubrik_cdm
rubrik = rubrik_cdm.Connect()

Note: You may use any variable name to connect to the Rubrik Cluster.

If you have not configured the correct environment variables you may also manually pass in the required authentication credentials.

import rubrik_cdm
node_ip = ""
username = "sdk@rangers.lab"
password = "RubrikPythonSDK"
rubrik = rubrik_cdm.Connect(node_ip, username, password)
import rubrik_cdm
node_ip = ""
api_token "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUVkN2FhYzlfZWU0MzA5ODQtMGE1Zi00NGZjLTliNTYtN"
rubrik = rubrik_cdm.Connect(node_ip, api_token=api_token)


To enable debuging set the Connect() enable_logging keyword argument to True.



import rubrik_cdm
rubrik = rubrik_cdm.Connect(enable_logging=True)
cluster_version = rubrik.cluster_version()


[2018-08-08 09:18:59,687] [DEBUG] -- Node IP:
[2018-08-08 09:18:59,687] [DEBUG] -- Username: demo
[2018-08-08 09:18:59,687] [DEBUG] -- Password: *******
[2018-08-08 09:19:00,062] [DEBUG] -- cluster_version: Getting the software version of the Rubrik Cluster.
[2018-08-08 09:19:00,062] [DEBUG] -- GET
[2018-08-08 09:19:00,443] [DEBUG] -- <Response [200]>

Certificate Verification

When connecting to a Rubrik cluster without certificate verification enabled (see the Rubrik CDM Security Guide for additional information) you will receive the following warning message:

/usr/local/lib/python3.6/site-packages/urllib3/ InsecureRequestWarning:
Unverified HTTPS request is being made. Adding certificate verification is strongly advised.

To supress this warning add the following code to your script:

import urllib3