Installation Guide
This guide covers installing the Cudo Compute SDK and setting up authentication.
Prerequisites
- Python 3.12 or higher
- pip or uv package manager
- A Cudo Compute account with an API key
Installation Methods
Using pip
pip install cudo-compute-sdk
Using uv (Recommended)
# Install uv if you haven't already
pip install uv
# Install the SDK
uv pip install cudo-compute-sdk
From Source
For development or to use the latest unreleased features:
git clone https://github.com/vantagecompute/cudo-compute-sdk
cd cudo-compute-sdk
# Create virtual environment
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install with development dependencies
uv sync
Obtaining an API Key
To use the Cudo Compute SDK, you need an API key:
- Log in to the Cudo Compute Console
- Navigate to Settings → API Keys
- Click Create API Key
- Give your key a descriptive name
- Copy the generated API key (it will only be shown once)
- Store it securely
Configuration
Environment Variable (Recommended)
Store your API key in an environment variable:
export CUDO_API_KEY="your-api-key-here"
Add this to your .bashrc
, .zshrc
, or .env
file for persistence.
Direct Initialization
Alternatively, pass the API key directly when initializing the SDK:
from cudo_compute_sdk import CudoComputeSDK
sdk = CudoComputeSDK(api_key="your-api-key-here")
Using python-dotenv
For managing environment variables in development:
pip install python-dotenv
Create a .env
file:
CUDO_API_KEY=your-api-key-here
In your Python code:
import os
from dotenv import load_dotenv
from cudo_compute_sdk import CudoComputeSDK
load_dotenv()
sdk = CudoComputeSDK(api_key=os.getenv("CUDO_API_KEY"))
Verifying Installation
Test that the SDK is installed and working:
import asyncio
from cudo_compute_sdk import CudoComputeSDK
async def verify():
sdk = CudoComputeSDK(api_key="your-api-key")
try:
projects = await sdk.list_projects()
print(f"✓ SDK working! Found {len(projects)} projects.")
except Exception as e:
print(f"✗ Error: {e}")
finally:
await sdk.close()
asyncio.run(verify())
Next Steps
- Usage Examples – Learn how to use the SDK
- API Reference – Explore available methods
- Troubleshooting – Get help with common issues