Documentation

Installation

Install the Scopix Python SDK

Requirements

  • Python 3.9 or higher
  • pip package manager
  • A Scopix API key

1. Get Your API Key

You need an API key to both install and use the SDK.

1. Sign up or log in at scopix.ai

2. Navigate to Dashboard → API Keys

3. Click "Create API Key"

4. Copy your key (format: scopix_...)

2. Install the SDK

Install the package using pip with your API key for authentication

bash
pip install scopix --extra-index-url https://scopix:scopix_YOUR_KEY_HERE@api.scopix.ai/api/v2/sdk/simple/

Replace scopix_YOUR_KEY_HERE with your actual API key from Step 1.

pip Configuration (Optional)

To avoid passing the URL every time, add it to your pip config:

ini
# ~/.pip/pip.conf (Linux/macOS) or %APPDATA%\pip\pip.ini (Windows)
[global]
extra-index-url = https://scopix:scopix_YOUR_KEY_HERE@api.scopix.ai/api/v2/sdk/simple/

Then you can simply run pip install scopix.

3. Set Up Environment Variable (Recommended)

Store your API key securely as an environment variable

bash
# Linux/macOS
export SCOPIX_API_KEY="scopix_your_key_here"
# Windows (PowerShell)
$env:SCOPIX_API_KEY="scopix_your_key_here"
# Or add to your .env file
echo 'SCOPIX_API_KEY=scopix_your_key_here' >> .env

4. Verify Installation

Test that everything is working

python
import asyncio
import os
from scopix import Scopix
async def test_connection():
api_key = os.environ.get("SCOPIX_API_KEY")
async with Scopix(api_key=api_key) as client:
# Check quota to verify connection
quota = await client.files.check_quota(file_count=1)
print(f"Connection successful!")
print(f"Monthly limit: {quota.monthly_limit}")
print(f"Current usage: {quota.current_usage}")
print(f"Available: {quota.available}")
asyncio.run(test_connection())

Security Note

Never commit your API key to version control. Always use environment variables or a secure secrets manager. The SDK will validate your API key format on initialization.

Optional: Install with Extras

Install with optional dependencies for additional features

bash
# Install with .env file support
pip install "scopix[dotenv]" --extra-index-url https://scopix:scopix_YOUR_KEY_HERE@api.scopix.ai/api/v2/sdk/simple/
# Install with OpenTelemetry tracing
pip install "scopix[tracing]" --extra-index-url https://scopix:scopix_YOUR_KEY_HERE@api.scopix.ai/api/v2/sdk/simple/
# Install all optional dependencies
pip install "scopix[all]" --extra-index-url https://scopix:scopix_YOUR_KEY_HERE@api.scopix.ai/api/v2/sdk/simple/