-
Notifications
You must be signed in to change notification settings - Fork 0
T3 API : Setting Up Python
- 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.
- Open the command line
- Install UV
- Install Python:
uv python install
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.
To open the command line:
-
Windows:
- Press
Win + R, typecmd, and hit Enter for Command Prompt. - Or search for "PowerShell" or "Windows Terminal".
- Press
-
macOS:
- Press
Command + Space, type "Terminal", and press Enter.
- Press
-
Linux:
- Press
Ctrl + Alt + Tor search for "Terminal" in your application menu.
- Press
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.
-
Windows:
- Option 1: Shift + Right-click inside a folder → “Open PowerShell window here”
-
Option 2: Type
cmdorpowershellin 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
cdand 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
For beginners, we recommend using Python and UV to interact with the T3 API. All T3 example scripts are written in Python.
UV is a Python package and environment manager. It simplifies dependency handling, virtual environments, and even installs Python itself.
- Use the standalone installer
- This method does not require Python to already be installed
With UV installed, run:
uv python installThis installs the latest Python version automatically.
Before running scripts, make sure your terminal is "in" the folder where the script lives. See Navigating Directories above.
-
Windows: Try
py script.pyifpythondoesn’t work. -
macOS/Linux: Use
python3instead ofpythonif needed.
-
“Python is not recognized…”: Python isn't in your system's PATH. Try using UV’s Python (
uv python install) or reinstall from python.org and check the box to "Add to PATH". -
Permission Errors (macOS/Linux):
Run
chmod +x script.pyif the script needs execution permissions. -
Package not found:
Make sure you ran
uv pip install -r requirements.txtfrom the correct folder.
- Learn how to write and execute a Python script
- Refer to the T3 API documentation to explore all the available endpoints.
- Most API endpoints require a T3+ subscription. If you don't have a T3+ subscription, you can sign up here.
Created by Matt Frisbie
Contact: matt@trackandtracetools
Copyright © 2025 Track & Trace Tools. All rights reserved.
- Home
- FAQ
- Metrc
- T3 Chrome Extension
- T3 API
- OpenTag
- T3 API : Python Utils
- T3 Labels : Label Templates
- T3 Chrome Extension : Exports
- T3 Chrome Extension : Scan Sheets
- T3 Labels : Tutorial
- RFID
- T3 Chrome Extension : CSV Form Fill
- T3 Labels : Label Layouts
- T3+
- T3 API : Setting Up Python
- T3 Chrome Extension : T3+ Features
- T3 Labels : Printing Label PDFs
- T3 API : API Scripts
- T3 Chrome Extension : Label Studio
- T3 Chrome Extension : Primary Features
- T3 Chrome Extension : Getting Started
- T3 Labels
- T3 Labels : Generating Label PDFs
- T3 API : Reports and Spreadsheet Sync
- T3 API : Getting Started
- T3 Labels : Getting Started