# `abacusai.api_class`

## Submodules

- `abacusai.api_class.abstract`
- `abacusai.api_class.enums`
- `abacusai.api_class.feature_group`

## Package Contents

### Classes

`ApiClass` | Helper class that provides a standard way to create an ABC using
`_ApiClassFactory` | Helper class that provides a standard way to create an ABC using
`SamplingConfig` | An abstract class for the sampling config of a feature group
`NSamplingConfig` | The number of distinct values of the key columns to include in the sample, or number of rows if key columns not specified.
`PercentSamplingConfig` | The fraction of distinct values of the feature group to include in the sample.
`_SamplingConfigFactory` | Helper class that provides a standard way to create an ABC using

class abacusai.api_class.ApiClass

  Bases: `abc.ABC`

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

  __post_init__()
  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._ApiClassFactory

  Bases: `abc.ABC`

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

  config_abstract_class
  config_class_key
  config_class_map
  classmethod from_dict(config)
    Parameters:

      config (dict) –

    Return type:

      ApiClass

class abacusai.api_class.SamplingConfig

  Bases: `abacusai.api_class.abstract.ApiClass`

  An abstract class for the sampling config of a feature group

  __post_init__()

class abacusai.api_class.NSamplingConfig

  Bases: `SamplingConfig`

  The number of distinct values of the key columns to include in the sample, or number of rows if key columns not specified.

  Parameters:

    - sampling_method (SamplingMethodType) – N_SAMPLING

    - sample_count (int) – The number of rows to include in the sample

    - key_columns (list[str]) – The feature(s) to use as the key(s) when sampling

  sample_count: int
  sampling_method: abacusai.api_class.enums.SamplingMethodType
  key_columns: List[str]
  __post_init__()

class abacusai.api_class.PercentSamplingConfig

  Bases: `SamplingConfig`

  The fraction of distinct values of the feature group to include in the sample.

  Parameters:

    - sampling_method (SamplingMethodType) – PERCENT_SAMPLING

    - sample_percent (float) – The percentage of the rows to sample

    - key_columns (list[str]) – The feature(s) to use as the key(s) when sampling

  sample_percent: float
  sampling_method: abacusai.api_class.enums.SamplingMethodType
  key_columns: List[str]
  __post_init__()

class abacusai.api_class._SamplingConfigFactory

  Bases: `abacusai.api_class.abstract._ApiClassFactory`

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

  config_abstract_class
  config_class_key = 'sampling_method'
  config_class_map