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
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:
# ~/.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
# Linux/macOSexport SCOPIX_API_KEY="scopix_your_key_here"
# Windows (PowerShell)$env:SCOPIX_API_KEY="scopix_your_key_here"
# Or add to your .env fileecho 'SCOPIX_API_KEY=scopix_your_key_here' >> .env4. Verify Installation
Test that everything is working
import asyncioimport osfrom 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
# Install with .env file supportpip install "scopix[dotenv]" --extra-index-url https://scopix:scopix_YOUR_KEY_HERE@api.scopix.ai/api/v2/sdk/simple/
# Install with OpenTelemetry tracingpip install "scopix[tracing]" --extra-index-url https://scopix:scopix_YOUR_KEY_HERE@api.scopix.ai/api/v2/sdk/simple/
# Install all optional dependenciespip install "scopix[all]" --extra-index-url https://scopix:scopix_YOUR_KEY_HERE@api.scopix.ai/api/v2/sdk/simple/
