Registry / ai-ml / tecton

tecton

JSON →
library1.2.13pypypi✓ verified 23d ago

Tecton is an operational feature platform that orchestrates the entire feature lifecycle for machine learning models. The Tecton Python SDK provides tools to define, test, and deploy features, interact with the Tecton API, and retrieve feature data for online and offline use cases. Version 1.2.13 is current, with frequent minor releases.

pip install tecton
INSTALL
IMPORT
SIG · TECTON
T
tecton
ai-mlpythonv1.2.13
Install
27.1s avg
Import
Disk
621MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.2.13 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 28.2s
py 3.11
✓ —
✓ 24.8s
py 3.12
✓ —
✓ 23s
py 3.13
✕ build_error
✕ build_error
py 3.9
✓ —
✓ 32.5s
621MB installed
● package 621MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TectonClient
from tecton import TectonClient
FeatureView
from tecton import FeatureView
Used for defining new feature views.
get_workspace
from tecton import get_workspace
Used to connect to a specific Tecton workspace context.
batch_materialization
from tecton import batch_materialization
Helper for configuring batch materialization.
RequestSource
from tecton import RequestSource
Used for defining request-time features.

Demonstrates how to initialize the Tecton client using an API key from environment variables and fetch online features from an existing Feature Service. This example requires a configured Tecton workspace and Feature Service to run successfully.

import os from tecton import TectonClient # --- IMPORTANT: Setup for quickstart --- # 1. Set your Tecton API key as an environment variable: # export TECTON_API_KEY="YOUR_API_KEY" # 2. Replace 'your_workspace_name' with an actual workspace you have access to. # (Find in Tecton UI or via `tecton list workspaces` CLI command) # 3. Replace 'your_feature_service_name' and 'your_join_key' with actual values. # (Requires an existing FeatureService in your workspace) # ------------------------------------------- api_key = os.environ.get('TECTON_API_KEY', '') if not api_key: print("Warning: TECTON_API_KEY environment variable not set. This example will likely fail.") # In a real application, you might raise an error or exit. # Initialize the Tecton client try: client = TectonClient( workspace_name='your_workspace_name', # e.g., 'prod' api_key=api_key ) print(f"Successfully connected to Tecton workspace: {client.workspace_name}") # Example: Get online features for a specific entity. # This assumes you have a FeatureService configured in your workspace. # and it expects a specific join key (e.g., 'user_id'). feature_service_name = "your_feature_service_name" # e.g., 'user_transaction_counts_fs' join_keys = {"your_join_key": "entity_id_example"} # e.g., {"user_id": "user_123"} # Fetch features feature_vector = client.get_online_features( feature_service_name=feature_service_name, join_keys=join_keys ) if feature_vector and not feature_vector.empty: print(f"\nSuccessfully retrieved features from {feature_service_name}:") print(feature_vector.to_pandas()) else: print(f"\nNo features retrieved or feature vector is empty for {feature_service_name} with join keys {join_keys}.") print("Please check FeatureService name, join keys, and if features are materialized.") except Exception as e: print(f"\nError during Tecton client initialization or feature retrieval: {e}") print("Ensure your TECTON_API_KEY is valid, workspace_name exists, and network connectivity is present.")
tecton --version
Debug
Known issues
gotchaTecton SDK operations (like `TectonClient` initialization or `apply()` calls) require proper authentication, typically via a `TECTON_API_KEY` environment variable or explicit `api_key` parameter. Failing to set it will result in authentication errors.
fix
Ensure `TECTON_API_KEY` is set in your environment (e.g., `export TECTON_API_KEY='...'`) or pass `api_key='...'` directly to `TectonClient` or `get_workspace`.
affects: All
gotchaMany SDK operations are context-dependent and require specifying the correct Tecton workspace name. Incorrect or non-existent workspace names will lead to errors.
fix
Always explicitly pass the `workspace_name` parameter to `TectonClient` or `get_workspace`. Verify the workspace name matches an existing one in your Tecton deployment.
affects: All
gotchaFeature definitions applied via the SDK (`FeatureView.apply()`) are not immediately available for querying. They must first be materialized, which involves Tecton running data pipelines. Online feature queries will fail or return stale data if materialization is not complete or up-to-date.
fix
After applying feature definitions, monitor materialization jobs in the Tecton UI or via `tecton materialization monitor` CLI command. Ensure data sources are accessible and materialization schedules are configured correctly.
affects: All
Upgrade
Version history
1.2.13latest on PyPI · released Dec 5, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
22
OpenAI (training)
1
Resources
tecton — pip install tecton · libregistry