Installation

This guide covers installing the Amigo SDK in your Python or TypeScript/JavaScript project.

Requirements

  • Python 3.8 or higher

  • pip (Python package manager)

Install from PyPI

Install the latest version of the Python SDK using pip:

pip install amigo_sdk

Add to requirements.txt

For reproducible builds, add the SDK to your requirements.txt file:

amigo_sdk

Then install dependencies:

pip install -r requirements.txt

We recommend using a virtual environment to avoid dependency conflicts:

# Create virtual environment
python -m venv amigo-env

# Activate virtual environment
# On macOS/Linux:
source amigo-env/bin/activate
# On Windows:
amigo-env\Scripts\activate

# Install SDK
pip install amigo_sdk

Verify Installation

Verify the installation by importing the SDK:

from amigo_sdk import AmigoClient
print("Amigo Python SDK installed successfully!")

Configuration Setup

Both SDKs support initialization with configuration parameters passed directly to the client constructor.

Regional Endpoints Ensure you set the correct regional base URL for your organization. See Regions & Endpoints.

from amigo_sdk import AmigoClient

# Initialize with configuration parameters
with AmigoClient(
    api_key="your-api-key",
    api_key_id="your-api-key-id", 
    user_id="user-id",
    organization_id="your-organization-id",
    base_url="https://api.amigo.ai"  # optional
) as client:
    # Use the client
    pass

Environment Variables

For enhanced security, use environment variables for configuration. Create a .env file in your project root:

AMIGO_API_KEY=your-api-key
AMIGO_API_KEY_ID=your-api-key-id
AMIGO_USER_ID=user-id
AMIGO_ORGANIZATION_ID=your-organization-id
AMIGO_BASE_URL=https://api.amigo.ai

Install python-dotenv to load environment variables:

pip install python-dotenv

Then load them in your application:

from dotenv import load_dotenv
load_dotenv()

from amigo_sdk import AmigoClient

# Automatically loads from environment variables
with AmigoClient() as client:
    pass

Next Steps

Once you have the SDK installed, proceed to:

Last updated

Was this helpful?