Documentation Index
Fetch the complete documentation index at: https://docs.contextbase.dev/llms.txt
Use this file to discover all available pages before exploring further.
Install the SDK
Install the Contextbase Python SDK using pip:
Requirements
- Python 3.8 or higher
- An active Contextbase account with API key
Get Your API Key
- Sign up at app.contextbase.dev
- Navigate to your account settings
- Generate a new API key
- Store it securely - you’ll need it for authentication
Quick Setup
Set your API key as an environment variable:
export CONTEXTBASE_API_KEY="your-api-key-here"
Or pass it directly when initializing the client:
from contextbase import Contextbase
client = Contextbase(api_key="your-api-key-here")
Verify Installation
Test your installation with a simple script:
from contextbase import Contextbase
# Initialize client
client = Contextbase()
# Test connection (this will fail gracefully if no API key is set)
try:
response = client.resolve_context("test-context")
print("✅ SDK installed successfully!")
except Exception as e:
if "API key" in str(e):
print("⚠️ SDK installed but API key not configured")
else:
print(f"❌ Installation issue: {e}")