New API Key management commands. Plus, tecton.get_feature_vector() and tecton.get_feature_freshness() methods | Tecton

Tecton

Home / Whats New / New API Key management commands. Plus, tecton.get_feature_vector() and tecton.get_feature_freshness() methods /

New API Key management commands. Plus, tecton.get_feature_vector() and tecton.get_feature_freshness() methods

New API Key management commands

The CLI “API key” commands have been refactored as sub-commands for consistency and clearer help docs.

$ tecton -h
...
commands:
  api-key create         create a new API key
  api-key delete         deactivate an API key by its ID
  api-key list           list active API keys
...

The previous CLI commands (e.g. tecton create-api-key) have been deprecated but are still supported.

tecton.get_feature_vector() metadata

The get_feature_vector() method now returns more metadata, specifically effective feature times and slo information.

To access slo information:

fs = tecton.get_feature_service('...name...')
keys = {'user_id': '10'}
slo_info = fs.get_feature_vector(keys).slo_info

To access effective feature times use the return_effective_times parameter:

fs = tecton.get_feature_service('...name...')
keys = {'user_id': '10'}
feature_vector = fs.get_feature_vector(keys)

response_dict = feature_vector.to_dict(return_effective_times=True)
response_pandas = feature_vector.to_pandas(return_effective_times=True)
response_numpy = feature_vector.to_numpy(return_effective_times=True)

New tecton.get_feature_freshness() method for viewing freshness status in a Notebook

There is now a tecton.get_feature_freshness() method that returns the freshness status of all features in a given workspace. This returns the same information as the CLI command tecton freshness :

import tecton
tecton.get_feature_freshness('workspace_name')

To get the data returned in a Python dictionary set the to_dict parameter:

freshness_dict = tecton.get_feature_freshness('workspace_name', to_dict=True)

Introducing Tecton SDK 0.3

Tecton SDK version 0.3 has just been released and is now available. We highly recommend upgrading to version 0.3 to access new features and improvements. Note that version 0.2 of the SDK will continue to be supported until June 2022.

Read More »

© Tecton, Inc. All rights reserved. Various trademarks held by their respective owners.

Request a free trial

Interested in trying Tecton? Leave us your information below and we’ll be in touch.​

Tell us a bit more...​

Interested in trying Tecton? Leave us your information below and we’ll be in touch.​

Request a free trial

Interested in trying Tecton? Leave us your information below and we’ll be in touch.​