Config
The config parameter can be used to provide a dictionary containing the project configuration like user and password for basic auth or a bearer token. The format of the dictionary for basic auth must be as this:
The format of the dictionary for bearer token must be as this:
In case you try to get a project without from the backend with invalid credentials, an exception will be raised.
Because the backend client is a Singleton object, it will autoconfigure credentials at startup, so the only way to setup proper credentials once it fails to connect is to use the SDK method set_dhub_env().
The method accepts the following optional parameters:
endpoint: the endpoint of the backenduser: the user for basic authpassword: the password for basic authtoken: the auth token
Example:
Note that the set_dhub_env() method ovverrides the environment variables and (if already instantiated) the credentials attributes of the backend client.