Skip to content

Setting Up Python

You only need a basic knowledge of using the command line to run T3 API Python scripts. This knowledge can be picked up very quickly.


TL;DR

  1. Open the command line
  2. Install UV
  3. Install Python: uv python install
  4. Log in to T3 once: uvx --from t3api-utils t3api login (see Logging In)

Learning to use the Command Line

What is the Command Line?

The command line, also called the terminal or shell, is an interface that lets you interact with your computer using text commands. It’s especially useful for running programs like Python scripts without needing a graphical interface.

Opening the Command Line

To open the command line:

  • Windows:

    • Press Win + R, type cmd, and hit Enter for Command Prompt.
    • Or search for "PowerShell" or "Windows Terminal".
    • macOS:

    • Press Command + Space, type "Terminal", and press Enter.

    • Linux:

    • Press Ctrl + Alt + T or search for "Terminal" in your application menu.


The command line is always "inside" a specific folder on your computer. To run a script, you need to open the terminal in the same folder or navigate to it manually using the cd command.

Open a terminal in the current folder:
  • Windows:

    • Option 1: Shift + Right-click inside a folder → “Open PowerShell window here”
    • Option 2: Type cmd or powershell in File Explorer’s address bar
    • Option 3: Use Windows Terminal from the Microsoft Store
  • macOS:

    • Option 1: Right-click in Finder → “New Terminal at Folder”
    • Option 2: In Terminal, type cd and drag the folder into the window
  • Linux:

    • Option 1: Right-click in file manager → “Open in Terminal”
    • Option 2: Navigate to folder, press Ctrl + Alt + T

Setting Up Your Environment

For beginners, we recommend using Python and UV to interact with the T3 API. All T3 example scripts are written in Python.


Installing UV

UV is a Python package and environment manager. It simplifies dependency handling, virtual environments, and even installs Python itself.


Installing Python

With UV installed, run:

uv python install

This installs the latest Python version automatically.


Set Your Terminal Location

Before running scripts, make sure your terminal is "in" the folder where the script lives. See Navigating Directories above.

Troubleshooting

  • Run scripts with uv run: uv run example.py installs the script's dependencies and runs it with the right Python. You do not need to call python directly.
  • “uv is not recognized…”: the installer finished but your terminal has not picked up the new PATH. Close the terminal and open a new one.
  • “No such file or directory”: your terminal is in a different folder from the script. See Navigating Directories.
  • A package is not found: the script's dependency header is missing it. See Inline Packages.

Next Steps