Context#
- class datarobotx.Context(**kwargs)#
Interface for initializing, accessing, and setting drx context variables.
- Parameters:
token (str) – DataRobot API token
endpoint (str) – DataRobot API endpoint
pred_server_id (str) – Default prediction server id to use for deployments
config_path (str) – Path to DataRobot configuration yaml file. If specified, values for token, endpoint, and pred_server_id in the yaml file will take precedence.
Examples
>>> import datarobotx as drx >>> drx.Context() # show current configuration {'token': '***', 'endpoint': 'https://app.datarobot.com/api/v2', 'pred_server_id': '***'} >>> drx.Context(token='foo', endpoint='bar') # update current configuration {'token': 'foo', 'endpoint': 'bar', 'pred_server_id': '***'} >>> c = drx.Context() >>> c.pred_server_id = 'foo_bar' # alternative approach to update >>> drx.Context() {'token': 'foo', 'endpoint': 'bar', 'pred_server_id': 'foo_bar'} >>> drx.Context(config_path='my_path/my_config.yaml') # update from file {'token': 'my_config_token', 'endpoint': 'my_config_endpoint', 'pred_server_id': 'my_config_pred_server_id'}
Attributes:
dr_context
DataRobot API endpoint.
DataRobot prediction server id for deployments.
Whether charts render in dark or light.
DataRobot API token.