Install the Python SDK and CLI
Install the Unitlab Python SDK and CLI, verify version 3.1.6, and prepare your first data or annotation upload.
The unitlab package provides both the Python SDK and the unitlab command-line tool. Use Python 3.10 or newer. The upload examples in these guides are checked against Unitlab 3.1.6.
Create a Python environment
Create a working directory for your first example, then create its environment:
mkdir road-scenes
cd road-scenes
python -m venv .venvIf your system uses python3, use python3 -m venv .venv for this first command. After activation, the examples use python.
Activate it on macOS or Linux:
source .venv/bin/activateOn Windows PowerShell:
.venv\Scripts\Activate.ps1Verify the SDK and CLI
python -c "from importlib.metadata import version; print(version('unitlab'))"
unitlab --version
unitlab --helpWith the pinned installation, both version checks should report 3.1.6; unitlab --help should list the command groups. The Python package and CLI should report the same version. If they differ, activate the environment again and check which unitlab executable your shell resolves.
Authenticate and choose a guide
Follow Authentication and configuration to connect the SDK and CLI to your workspace.
Upload a file or folder, or loop over a local file list
Upload reusable data to the Asset library
Import existing annotations
Group related files into one work item
Upload from a terminal
For repeatable jobs, pin the package version in your dependency file. After an upgrade, check the installed command help and run a small representative upload before processing a full dataset.