abacusai.python_function — AbacusAI documentation

# `abacusai.python_function`

## Module Contents

### Classes

`PythonFunction` | Customer created python function

class abacusai.python_function.PythonFunction(client, notebookId=None, name=None, createdAt=None, functionVariableMappings=None, functionName=None, pythonFunctionId=None, functionType=None, codeSource={})

  Bases: `abacusai.return_class.AbstractApiClass`

  Customer created python function

  Parameters:

    - client (ApiClient) – An authenticated API Client instance

    - notebookId (str) – The unique identifier of the notebook used to spin up the notebook upon creation

    - name (str) – The name to identify the algorithm, only uppercase letters, numbers and underscore allowed

    - createdAt (str) – When the python function was created

    - functionVariableMappings (dict) –

    - functionName (str) – The name of the python function to be used

    - pythonFunctionId (str) – The unique identifier of the python function

    - functionType (str) – The type of the python function

    - codeSource (CodeSource) – Info about the source code of the python function

  __repr__()

    Return repr(self).

  to_dict()

    Get a dict representation of the parameters in this class

    Returns:

      The dict value representation of the class parameters

    Return type:

      dict

  add_graph_to_dashboard(graph_dashboard_id, function_variable_mappings=None)

    Add a python plot function to a dashboard

    Parameters:

      - graph_dashboard_id (str) – The graph dashboard id to update

      - function_variable_mappings (dict) – List of arguments to be supplied to the function as parameters in the format [{‘name’: ‘function_argument’, ‘variable_type’: ‘FEATURE_GROUP’, ‘value’: ‘name_of_feature_group’}].

    Returns:

      An object describing the graph dashboard

    Return type:

      GraphDashboard

  update_graph_to_dashboard(graph_dashboard_id, function_variable_mappings=None)

    Update a python plot function to a dashboard

    Parameters:

      - graph_dashboard_id (str) – The graph dashboard id to update

      - function_variable_mappings (dict) – List of arguments to be supplied to the function as parameters in the format [{‘name’: ‘function_argument’, ‘variable_type’: ‘FEATURE_GROUP’, ‘value’: ‘name_of_feature_group’}].

    Returns:

      An object describing the graph dashboard

    Return type:

      GraphDashboard

  describe_graph_for_dashboard(graph_dashboard_id)

    Describes a python plot to a graph dashboard

    Parameters:

      graph_dashboard_id (str) – The graph dashboard id to update

    Returns:

      An object describing the graph dashboard

    Return type:

      PythonFunction