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

# Install the Python SDK and CLI

{% hint style="info" %}
**Outcome:** create a reproducible Unitlab environment and prove that both developer entry points resolve to the same installation.
{% endhint %}

### Prerequisites

* Python 3.10 or newer.
* An isolated environment owned by the application or automation job.
* Access to the Python Package Index through the organization’s approved dependency manager.
* A lock file or image manifest that can preserve the selected version.

### Install the package

Add the package named `unitlab` at version `3.0.0` to the approved dependency manifest, then resolve that manifest inside the isolated environment. The distribution provides both the Python module and the `unitlab` console entry point.

Do not place a Unitlab API key in a dependency file, image layer, shell history, or build log. Installation does not require a production credential.

### Verify both entry points

1. Inspect the active environment and confirm that it reports Unitlab version 3.0.0.
2. Import `unitlab` from the application runtime.
3. Run `unitlab --version` from the same environment.
4. Run `unitlab --help` and confirm that the command groups required by the automation are present.
5. If module and console results differ, correct the environment before authenticating.

### Pin production environments

Commit the dependency lock or immutable image reference. Test an upgrade in a non-production workspace against the same create, upload, attach, workflow, and release operations used by the real job.

### Acceptance criteria

* Python and the CLI resolve to one pinned Unitlab installation.
* The package version is recorded in deployment evidence.
* No production credential was used during installation.
* A read-only authenticated check succeeds only after the environment has passed verification.

{% hint style="warning" %}
Treat a package upgrade as an application change. Preserve the prior lock or image so the automation can be rolled back if typed responses, validation behavior, command output, or long-running operations change.
{% endhint %}
