Tecton CLI Setup
Tecton CLI requires Python 3.7. Ensure your local versions are compatible using
python -V and
pip -V. See Python Setup for Python setup instructions.
The CLI is hosted on PyPI and can be installed
pip install 'tecton[pyspark]'
You can validate the installation with
[databricks-connect] are required as optional dependencies when installing the Tecton SDK. We recommend using
[pyspark] unless you are a Databricks Connect user.
Automatic authentication (recommended)
Connect the CLI to your Tecton deployment using
tecton login, which automatically authenticates and sets credentials:
$ tecton login Enter configuration. Press enter to use current value Tecton Cluster URL [example: https://yourco.tecton.ai]: https://foo.tecton.ai ✅ Authentication successful!
If the step above doesn't work, use the
--manual flag to generate a URL where an authentication code can be found.
$ tecton login --manual Enter configuration. Press enter to use current value Tecton Cluster URL [example: https://yourco.tecton.ai]: https://foo.tecton.ai Requesting authorization for Tecton CLI via browser. If browser doesn't open automatically, visit the following link: <go to this URL> Paste the authentication code here:abcdef123456789 ✅ Updated configuration at /Users/username/.tecton/config
Updates to the CLI are released regularly. To check which version you are using, use the following command:
$ tecton version Version: 0.0.22 Git Commit: 59837e8f37074441d0e3c17f01e4035e84afcfb3 Build Datetime: 2021-06-01T00:00:00
For major updates, you may be required to update the CLI to continue using Tecton. Use
pip to upgrade your tecton installation:
pip install --upgrade 'tecton[pyspark]'
Tecton CLI requires Python 3.7, however, this is not normally installed by default on most operating systems. We list two options to install Python 3.7 and use it to install the Tecton CLI and library below:
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.7 and create a virtual environment using it with the following commands. We use 3.7.10 as an example version of Python 3.7.
pyenv install 3.7.10 pyenv virtualenv 3.7.10 tecton pyenv activate tecton
Anaconda: Anaconda uses an alternative package manager to the standard Python
pippackage 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 using this method, follow these steps:
Once you've completed either the pyenv or Anaconda steps, you can finish installing the Tecton CLI in the Installation section.