> For the complete documentation index, see [llms.txt](https://docs.unitlab.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unitlab.ai/api-sdk-cli/get-started/install-the-python-sdk-and-cli.md). Agents can also search and read this documentation through its [MCP server](https://docs.unitlab.ai/~gitbook/mcp).

# Install the Python SDK and CLI

Install the unitlab package, which contains both the Python SDK and the unitlab command-line tool.

One package, `unitlab`, installs the Python SDK and the `unitlab` command. It needs **Python 3.10 or newer** and runs on macOS, Linux and Windows.

## Install

{% stepper %}
{% step %}

### Create a virtual environment

```bash
python3 -m venv .venv
source .venv/bin/activate
```

On Windows, run `.venv/Scripts/activate` instead.
{% endstep %}

{% step %}

### Install the package

```bash
python -m pip install --upgrade unitlab
```

For production jobs, pin the version so a new release never changes behavior under you:

```bash
python -m pip install "unitlab==3.2.0"
```

{% endstep %}

{% step %}

### Check the installation

```bash
unitlab --version
```

The command prints the installed version, for example `3.2.0`. In Python, `unitlab.__version__` holds the same value. If they differ, your shell is running a `unitlab` command from another environment. Activate the right environment and try again.
{% endstep %}
{% endstepper %}

Next, [create an API key and configure the client](https://docs.unitlab.ai/api-sdk-cli/get-started/authentication-and-api-keys.md).

## Other ways to install

| Tool                      | Command                                      |
| ------------------------- | -------------------------------------------- |
| pipx (CLI only, isolated) | `pipx install unitlab`                       |
| uv                        | `uv pip install unitlab` or `uv add unitlab` |
| Poetry                    | `poetry add unitlab`                         |
| requirements.txt          | `unitlab==3.2.0`                             |

## Dependencies

The package depends on `httpx`, `tqdm` and `typer`. It has no compiled extensions, so it installs in slim containers and CI images without build tools.

## Shell completion

Turn on tab completion for commands and options:

```bash
unitlab --install-completion
```

Restart the shell afterwards. `unitlab --show-completion` prints the script if you prefer to add it yourself.

## Proxies and TLS

The SDK uses `httpx`, which reads the standard proxy variables `HTTPS_PROXY`, `HTTP_PROXY`, `ALL_PROXY` and `NO_PROXY`. SOCKS proxies are supported. TLS certificates are always verified.

## Upgrade safely

1. Read the [changelog](https://docs.unitlab.ai/api-sdk-cli/get-started/versioning-and-changelog.md) for the versions between yours and the latest.
2. Upgrade a test environment first, with the same install command.
3. Run one small upload and one release download before you switch production jobs.

## Related

[Authentication and API keys](https://docs.unitlab.ai/api-sdk-cli/get-started/authentication-and-api-keys.md) · [Python SDK quickstart](https://docs.unitlab.ai/api-sdk-cli/get-started/python-sdk-quickstart.md) · [CLI quickstart](https://docs.unitlab.ai/api-sdk-cli/get-started/cli-quickstart.md)
