Skip to content

APIObject

class datarobot.models.api_object.APIObject

classmethod from_data(data)

Instantiate an object of this class using a dict.

  • Parameters: data (dict) – Correctly snake_cased keys and their values.
  • Return type: TypeVar(T, bound= APIObject)

classmethod from_server_data(data, keep_attrs=None)

Instantiate an object of this class using the data directly from the server, meaning that the keys may have the wrong camel casing

  • Parameters:
    • data (dict) – The directly translated dict of JSON from the server. No casing fixes have taken place
    • keep_attrs (iterable) – List, set or tuple of the dotted namespace notations for attributes to keep within the object structure even if their values are None
  • Return type: TypeVar(T, bound= APIObject)