featurizer_api_client package

Subpackages

Submodules

featurizer_api_client.client module

class featurizer_api_client.client.FeaturizerApiClient(host=None, port=None, verify=None, timeout=None, logging_configuration=None)[source]

Bases: object

Class implementing the lightweight client app for the Featurizer API

property access_token
property address
data_wrapper

alias of featurizer_api_client.utils.data.DataWrapper

featurize(access_token, refresh_token, features_pipeline, sample_values, sample_labels=None, extractor_configuration=None)[source]

Calls .featurize(…) on an injected featurization library via the API.

Parameters
  • access_token (str) – access token

  • refresh_token (str) – refresh token

  • features_pipeline (list of dicts) – features pipeline

  • sample_values (numpy.array) – sample values

  • sample_labels (list, optional) – sample labels, defaults to None

  • extractor_configuration (dict, optional) – extractor config, defaults to None

Returns

(data/error_info, status_code)

Return type

tuple

property featurize_endpoint
host = 'http://127.0.0.1'
log_in(username, password)[source]

Logs-in an existing user in the featurizer API.

Parameters
  • username (str) – username

  • password (str) – password

Returns

(data/error_info, status_code)

Return type

tuple

logging_configuration = {'class': 'logging.handlers.TimedRotatingFileHandler', 'kwargs': {'backupCount': 365, 'encoding': 'utf8', 'filename': '/home/docs/checkouts/readthedocs.org/user_builds/featurizer-api-client/envs/latest/lib/python3.9/site-packages/featurizer_api_client/../../logs/2021_11_26_client.log', 'interval': 1, 'when': 'midnight'}}
property login_endpoint
property password
port = 5000
refresh_access_token(refresh_token)[source]

Refreshes an access token in the featurizer API.

Parameters

refresh_token (str) – refresh token

Returns

(data/error_info, status_code)

Return type

tuple

property refresh_endpoint
refresh_required_errors = [<HTTPStatus.UNAUTHORIZED: 401>, <HTTPStatus.UNPROCESSABLE_ENTITY: 422>]
property refresh_token
sign_up(username, password)[source]

Signs-up a new user in the featurizer API.

Parameters
  • username (str) – username

  • password (str) – password

Returns

(data/error_info, status_code)

Return type

tuple

property signup_endpoint
timeout = 2
property username
verify = True

Module contents