New API Key management commands. Plus, tecton.get_feature_vector() and tecton.get_feature_freshness() methods
Some of the information in this post may be out of date. Please refer to the tecton service-account command and the User Management documentation for more relevant information.
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)