Skip to main content

Python SDK Installation

The Claro Python SDK is available on PyPI and supports Python 3.8 and higher.

Requirements

  • Python 3.8 or higher
  • pip (Python package installer)
  • A Claro API key (get one here)

Install via pip

Install the latest stable version:
pip install baytos-claro

Verify Installation

python -c "import baytos.claro; print(claro.__version__)"
We recommend using a virtual environment to isolate your project dependencies:
# Create virtual environment with uv (fastest)
uv venv

# Activate it
source .venv/bin/activate  # On macOS/Linux
# or
.venv\Scripts\activate  # On Windows

# Install Claro
uv pip install baytos-claro

Install from Source

To install the latest development version:
pip install git+https://github.com/baytos-ai/claro-python.git
Development versions may contain unstable features. Use stable releases for production.

Upgrading

To upgrade to the latest version:
pip install --upgrade claro
Check your current version:
pip show claro

Dependencies

The SDK has minimal dependencies:
  • requests - HTTP client for API calls
  • pydantic - Data validation and settings management
  • typing-extensions - Type hints for older Python versions
All dependencies are automatically installed with the SDK.

Platform Support

The Claro SDK is tested on:
  • Operating Systems: Linux, macOS, Windows
  • Python Versions: 3.8, 3.9, 3.10, 3.11, 3.12
  • Architectures: x86_64, ARM64

Configuration

After installation, configure your API key:
export BAYT_API_KEY="your_api_key_here"
Or use a .env file:
.env
BAYT_API_KEY=your_api_key_here
See Authentication for detailed setup instructions and best practices.

Troubleshooting

Install pip using your system’s package manager:
# macOS
brew install python3

# Ubuntu/Debian
sudo apt-get install python3-pip

# Windows: Download from python.org
Use --user flag to install without sudo:
pip install --user claro
Or use a virtual environment (recommended).
Ensure you’re using the correct Python interpreter:
# Check which Python you're using
which python
python --version

# Try using python3 explicitly
python3 -m pip install baytos-claro
python3 -c "import baytos.claro; print(claro.__version__)"
Update your SSL certificates:
pip install --upgrade certifi
Or install with trusted host flag:
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org claro

Next Steps