abacusai.api_class.python_functions — AbacusAI documentation

# abacusai.api_class.python_functions

## Classes

`ApiClass` | Helper class that provides a standard way to create an ABC using
`PythonFunctionArgument` | A config class for python function arguments
`OutputVariableMapping` | A config class for python function arguments

## Module Contents

class abacusai.api_class.python_functions.ApiClass

  Bases: `abc.ABC`

  Helper class that provides a standard way to create an ABC using inheritance.

  _upper_snake_case_keys: bool
  _support_kwargs: bool
  __post_init__()
  classmethod _get_builder()
  __str__()

    Return str(self).

  _repr_html_()
  __getitem__(item)
    Parameters:

      item (str)

  __setitem__(item, value)
    Parameters:

      - item (str)

      - value (Any)

  _unset_item(item)
    Parameters:

      item (str)

  get(item, default=None)
    Parameters:

      - item (str)

      - default (Any)

  pop(item, default=NotImplemented)
    Parameters:

      - item (str)

      - default (Any)

  to_dict()

    Standardizes converting an ApiClass to dictionary. Keys of response dictionary are converted to camel case. This also validates the fields ( type, value, etc ) received in the dictionary.

  classmethod from_dict(input_dict)
    Parameters:

      input_dict (dict)

class abacusai.api_class.python_functions.PythonFunctionArgument

  Bases: `abacusai.api_class.abstract.ApiClass`

  A config class for python function arguments

  Parameters:

    - variable_type (PythonFunctionArgumentType) – The type of the python function argument

    - name (str) – The name of the python function variable

    - is_required (bool) – Whether the argument is required

    - value (Any) – The value of the argument

    - pipeline_variable (str) – The name of the pipeline variable to use as the value

  variable_type: abacusai.api_class.enums.PythonFunctionArgumentType
  name: str
  is_required: bool
  value: Any
  pipeline_variable: str

class abacusai.api_class.python_functions.OutputVariableMapping

  Bases: `abacusai.api_class.abstract.ApiClass`

  A config class for python function arguments

  Parameters:

    - variable_type (PythonFunctionOutputArgumentType) – The type of the python function output argument

    - name (str) – The name of the python function variable

  variable_type: abacusai.api_class.enums.PythonFunctionOutputArgumentType
  name: str