Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

1

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 .venv

If 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/activate

On Windows PowerShell:

.venv\Scripts\Activate.ps1
2

Install Unitlab

For the version used in these examples:

python -m pip install "unitlab==3.1.6"

For an existing installation that you intentionally want to upgrade, use this command instead. It may install a version newer than the examples:

python -m pip install --upgrade unitlab
3

Verify the SDK and CLI

python -c "from importlib.metadata import version; print(version('unitlab'))"
unitlab --version
unitlab --help

With 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.

4

Authenticate and choose a guide

Follow Authentication and configuration to connect the SDK and CLI to your workspace.

Task
Guide

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

Annotation import is available through the Python SDK in this version. The CLI has data-upload and grouping commands, but no annotation-import command. The SDK guide shows how to run an import script 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.