Skip to main content

Install the Python SDK

Install the Custodian Labs Python SDK to build and deploy assistants from your Python application.

Requirements

  • Python 3.10 or later.
  • pip installed.
  • A Custodian Labs account with an active plan.
  • A generated API key.

Check your Python version:

python --version

Create a Virtual Environment

Using a virtual environment keeps the SDK and its dependencies separate from your other Python projects.

Create one in your project directory:

python -m venv .venv

Activate it on macOS or Linux:

source .venv/bin/activate

Activate it on Windows PowerShell:

.venv\Scripts\Activate.ps1

Install the Package

With your virtual environment active, run:

python -m pip install custodian-labs

To upgrade an existing installation, run:

python -m pip install --upgrade custodian-labs

Verify the Installation

Run:

python -c "import custodian_labs; print('Custodian Labs SDK installed successfully.')"

If the command runs without an import error, the SDK is installed.

Package Name and Import Name

Use custodian-labs when installing the package:

python -m pip install custodian-labs

Use custodian_labs when importing it in Python:

from custodian_labs import Custodian

Next Step

Continue to Authentication to connect the SDK to your Custodian Labs account.