Installation
Requirements
Section titled “Requirements”- Python 3.8 or higher
- Playwright 1.40.0 or higher
- An active Clio account
Install the SDK
Section titled “Install the SDK”Install the Clio SDK from PyPI using pip:
pip install clio_monitoringOr if you’re using Poetry:
poetry add clio_monitoringFor development installations, you can install from source:
git clone https://github.com/TreebeardHQ/clio-python-sdkcd clio-python-sdkpip install -e .Get Your API Key
Section titled “Get Your API Key”-
Sign up for Clio: If you don’t have an account, create one at app.cliomonitoring.com
-
Access Your Dashboard: Log in and navigate to your organization’s dashboard
-
Generate an API Key:
- Go to Settings → API Keys
- Click Generate New Key
- Give your key a descriptive name (e.g., “Local Development”)
- Copy the generated key (it starts with
clio_)
-
Store Securely: Save your API key in a secure location. You’ll need it to configure the SDK.
Verify Installation
Section titled “Verify Installation”Create a simple test script to verify everything is working:
from clio import ClioMonitor
# This should not raise any import errorsprint("✅ Clio SDK imported successfully")
# Test configuration (replace with your actual API key)try: monitor = ClioMonitor(api_key="clio_test_key_validation_only") print("✅ ClioMonitor created successfully")except ValueError as e: if "Invalid API key format" in str(e): print("✅ API key validation working") else: print(f"❌ Unexpected error: {e}")Run the test:
python test_clio.pyYou should see:
✅ Clio SDK imported successfully✅ API key validation workingEnvironment Setup
Section titled “Environment Setup”For security, store your API key as an environment variable:
Linux/macOS
Section titled “Linux/macOS”export CLIO_API_KEY="your_actual_api_key_here"Windows (Command Prompt)
Section titled “Windows (Command Prompt)”set CLIO_API_KEY=your_actual_api_key_hereWindows (PowerShell)
Section titled “Windows (PowerShell)”$env:CLIO_API_KEY="your_actual_api_key_here"Using a .env file
Section titled “Using a .env file”Create a .env file in your project root:
CLIO_API_KEY=your_actual_api_key_hereThen load it in your Python code:
from dotenv import load_dotenvimport os
load_dotenv()api_key = os.getenv("CLIO_API_KEY")Playwright Setup
Section titled “Playwright Setup”The Clio SDK works with Playwright’s video recording feature. Make sure you have Playwright installed and browsers downloaded:
# Install Playwrightpip install playwright
# Download browser binariesplaywright installNext Steps
Section titled “Next Steps”Now that you have the SDK installed and your API key ready, you can start monitoring your first automation:
- Quick Start Guide - Your first monitored automation
- Configuration Options - Customize SDK behavior
- Basic Example - Complete working example
Troubleshooting
Section titled “Troubleshooting”Import Errors
Section titled “Import Errors”If you get import errors, make sure:
- You’re using Python 3.8 or higher:
python --version - The SDK is installed in the correct environment:
pip list | grep clio_monitoring - You’re activating the right virtual environment
API Key Issues
Section titled “API Key Issues”If you have trouble with API keys:
- Ensure the key starts with
clio_ - Check for extra spaces or newlines when copying
- Verify the key is active in your Clio dashboard
- Make sure you’re using the API key, not your login password
Permission Errors
Section titled “Permission Errors”If you get permission errors during installation:
pip install --user clio_monitoringOr use a virtual environment:
python -m venv venvsource venv/bin/activate # On Windows: venv\Scripts\activatepip install clio_monitoring