Skip to main content

Python SDK

The Galileo Python SDK on PyPI.

Python SDK GitHub repo

The GitHub repo for the Galileo Python SDK.

Installation

pip install galileo
If you are using the free version of Galileo, there is no need to set the GALILEO_CONSOLE_URL environment variable.
If you are using the OpenAI wrapper, you need to install the optional OpenAI dependencies.
pip install "galileo[openai]"

Initialization/Authentication

You can configure Galileo using environment variables:
# Your Galileo API key
GALILEO_API_KEY="your-galileo-api-key"

# Your Galileo project name
GALILEO_PROJECT="your-galileo-project-name"

# The name of the Log stream you want to use for logging
GALILEO_LOG_STREAM="your-galileo-log-stream "

# Provide the console url below if you are using a
# custom deployment, and not using the free tier, or app.galileo.ai.
# This will look something like “console.galileo.yourcompany.com”.
# GALILEO_CONSOLE_URL="your-galileo-console-url"
If you are using the free version of Galileo, there is no need to set the GALILEO_CONSOLE_URL environment variable.