Skip to main content
Version: 1.1

Installing the Tecton CLI and SDK

This guide covers installing the Tecton CLI and SDK in your local development environment. Once installed, the Tecton package provides both CLI functionality for workspace management and deployment, and SDK functionality for feature development in notebook environments (e.g. Jupyter Notebooks).

Understanding the Tecton CLI vs SDKโ€‹

The Tecton package provides both CLI (Command Line Interface) and SDK (Software Development Kit) functionality, but they serve different purposes:

Tecton CLIโ€‹

The CLI handles infrastructure management, workspace operations, and deployment workflows:

  • Workspace management: tecton workspace create, tecton workspace select
  • Change preview: tecton plan (preview changes before deployment)
  • Feature deployment: tecton apply (deploy feature definitions)
  • Other administrative commands: tecton login, tecton logout, tecton version, tecton completion, tecton destroy, tecton environment, tecton get-caller-identity, tecton materialization, tecton model, tecton plan-info, tecton repo-config, tecton secrets, tecton server-group, tecton service-account, tecton upgrade, tecton user

Python SDKโ€‹

The SDK focuses on feature development and programmatic access:

  • Feature development in notebooks and local environments
  • Programmatic feature retrieval for training and inference
  • Testing and validation of feature logic
  • Authentication via tecton.login() for notebook environments

When to Use Eachโ€‹

  • Use CLI commands for workspace setup, feature deployment, and operational tasks
  • Use Python SDK for feature development, data science workflows, and programmatic feature access

For installing the Tecton CLI and SDK in your Spark environment, please see the following guides:

Install Pythonโ€‹

Python version support
  • The Tecton SDK supports Python 3.7 - 3.11.
  • The supported Python versions for Realtime Feature Views are 3.8 and 3.9.

Installing more than one Tecton SDK version into the same workspace can lead to inconsistent behavior. We recommend using Pyenv or Anaconda to manage your Tecton SDK and Python installations and environments:

Pyenvโ€‹

The popular Python version manager pyenv allows you to install different versions of Python, and the pyenv extension pyenv-virtualenv allows you to create a virtual environment using a specific Python version you've installed via pyenv. Once you've installed both packages, you can install Python 3.8 and create a virtual environment using it with the following commands. We use 3.8.12 as an example version of Python 3.8.

pyenv install 3.8.12
pyenv virtualenv 3.8.12 tecton
pyenv activate tecton

Anacondaโ€‹

Anaconda uses an alternative package manager to the standard Python pip package management, however it can install pip packages as well. Anaconda's package repository also has pre-compiled binaries for Python versions and popular libraries which are handy if you have trouble building Python using a Python version manager.

To install Python with Anaconda:

  1. Install Anaconda. You can also use the stripped down Miniconda installer.

  2. Create a new conda environment with Python 3.8:

    conda create -n tecton python=3.8 pip`.
    # Add `nomkl` after `pip` for x86 Anaconda installs on Apple Silicon computers
  3. Activate the conda environment with: conda activate tecton

After completing your Pyenv or Anaconda installation, install the Tecton SDK.

Apple Silicon (arm64) Considerations

The Tecton SDK pip dependencies have arm64 wheels except for grpcio. To use the Tecton SDK on Apple Silicon machines:

  1. Update your macOS to Monterey 12.1 or higher.
  2. Update to the latest version of the XCode Command Line Tools.
  3. Install and compile the grpcio dependencies.

Install the Tecton CLI and SDKโ€‹

The Tecton CLI and SDK are hosted on PyPI and you can install the latest version using pip. To learn more about the stable and beta Tecton versions please see Release Notes.

The pip command to install Tecton depends on your use case and the compute engine you are using.

Use CaseCompute EngineEnvironmentCommand to Install
Feature development with RiftRiftLocalpip install 'tecton[rift]>=1.2.0'
Feature development with Rift in notebooksRiftNotebookpip install 'tecton[rift]>=1.2.0'
Feature development in notebooksSparkNotebook (Databricks or EMR)pip install tecton
Feature development with latest Spark 3.xSpark 3.xLocalpip install 'tecton[pyspark]'
Feature development with Spark 3.2Spark 3.2Localpip install 'tecton[pyspark3.2]'
Feature development with Spark 3.3Spark 3.3Localpip install 'tecton[pyspark3.3]'
CLI-only usage (no feature development)N/AAnypip install tecton

If your local environment will only be used for CLI commands and not feature development or unit tests, then you can simply use pip install tecton.

Rift is currently in Public Preview and is available in Tecton 0.9+.

Validate the Tecton CLI and SDK installationโ€‹

You can validate the installation using tecton version. If the installation succeeded, the output will contain the SDK version number and other information:

$ tecton version
Version: 1.1.0
Git Commit: 5a2880f240d01958bfa26bf6d0b5b0adeea4e559
Build Datetime: 2025-01-22T10:00:00

In a notebook, test the Tecton version with:

import tecton
tecton.version.summary()

Log in to your Tecton Accountโ€‹

Authentication methods differ between CLI and SDK usage:

For CLI commands (workspace management, deployment, etc.), authenticate your terminal using: tecton login

For Python SDK usage (notebooks, feature development), authenticate your environment using: tecton.login()

Setting up Shell Completion (Optional)โ€‹

The Tecton CLI supports shell completion (aka tab completion, autocomplete) for zsh, bash, and fish. For typical setups, shell completion can be set up as follows:

# Generate and save the Tecton auto-complete script.
tecton completion --zsh > ~/.tecton-complete.zsh

# Enable zsh auto-completion. (Not needed if you already have auto-complete enabled, e.g. are using oh-my-zsh.)
echo 'autoload -Uz compinit && compinit' >> ~/.zshrc

# Add sourcing the script into your .zshrc.
echo '. ~/.tecton-complete.zsh' >> ~/.zshrc

Was this page helpful?