Installation
Install the Axol SDK for your preferred language and configure your environment.
Python SDK
Install
pip install axol-api-client
With Version Pinning (Recommended)
# Pin to specific version for reproducible builds
pip install axol-api-client==1.2.0
# Or add to requirements.txt
echo "axol-api-client>=1.2.0,<2.0.0" >> requirements.txt
Upgrade
# Upgrade to latest version
pip install --upgrade axol-api-client
# Check current version
pip show axol-api-client
Verify Installation
from axol import AxolClient, __version__
print(f"Axol SDK version: {__version__}")
client = AxolClient(api_key="your_api_key")
status = client.health_check()
print(f"Connected: {status}")
TypeScript/JavaScript SDK
Install
# npm
npm install @axol/api-client
# yarn
yarn add @axol/api-client
# pnpm
pnpm add @axol/api-client
With Version Pinning
# Pin to specific version
npm install @axol/api-client@1.2.0
# Or in package.json
{
"dependencies": {
"@axol/api-client": "^1.2.0"
}
}
Upgrade
# Check for updates
npm outdated @axol/api-client
# Upgrade to latest
npm update @axol/api-client
Verify Installation
import { AxolClient } from '@axol/api-client';
const client = new AxolClient({ apiKey: 'your_api_key' });
const status = await client.healthCheck();
console.log('Connected:', status);
Environment Configuration
Using Environment Variables (Recommended)
Create a .env file in your project root:
# .env
AXOL_API_KEY=your_api_key_here
Python:
import os
from axol import AxolClient
client = AxolClient(api_key=os.getenv('AXOL_API_KEY'))
TypeScript:
import { AxolClient } from '@axol/api-client';
const client = new AxolClient({
apiKey: process.env.AXOL_API_KEY
});
Using dotenv
Python:
pip install python-dotenv
from dotenv import load_dotenv
load_dotenv()
client = AxolClient(api_key=os.getenv('AXOL_API_KEY'))
TypeScript:
npm install dotenv
import 'dotenv/config';
const client = new AxolClient({
apiKey: process.env.AXOL_API_KEY
});
Direct API Access
If you prefer not to use an SDK, access the API directly:
Base URL: https://api.axol.io/api/v1
Authentication: Include your API key in the X-API-Key header
cURL Example
curl -X GET https://api.axol.io/api/v1/health \
-H "X-API-Key: $AXOL_API_KEY"
Python (requests)
pip install requests
import requests
response = requests.get(
'https://api.axol.io/api/v1/health',
headers={'X-API-Key': 'your_api_key'}
)
print(response.json())
TypeScript (fetch)
const response = await fetch('https://api.axol.io/api/v1/health', {
headers: { 'X-API-Key': process.env.AXOL_API_KEY }
});
const data = await response.json();
console.log(data);
Troubleshooting
Python Issues
ModuleNotFoundError: No module named 'axol'
# Ensure you're using the correct pip
python -m pip install axol-api-client
# Or check virtual environment is activated
source venv/bin/activate # Linux/Mac
.\venv\Scripts\activate # Windows
SSL Certificate Errors
# Update certificates
pip install --upgrade certifi
Version Conflicts
# Check installed version
pip show axol-api-client
# Force reinstall
pip install --force-reinstall axol-api-client
TypeScript Issues
Cannot find module '@axol/api-client'
# Clear node_modules and reinstall
rm -rf node_modules package-lock.json
npm install
Type Errors
# Ensure TypeScript is up to date
npm install typescript@latest
# Check tsconfig.json includes node_modules types
{
"compilerOptions": {
"moduleResolution": "node"
}
}
Connection Issues
Timeout Errors
# Increase timeout
client = AxolClient(
api_key="your_key",
timeout=60 # seconds
)
401 Unauthorized
- Verify API key is correct
- Check for extra whitespace in key
- Ensure key hasn't been revoked in dashboard
429 Rate Limited
- You've exceeded your CU throughput limit
- Implement exponential backoff
- Consider upgrading your tier
Requirements
Python
- Python 3.8 or higher
- pip 20.0 or higher
TypeScript/JavaScript
- Node.js 16 or higher
- npm 7 or higher (or yarn/pnpm equivalent)
Next Steps
- Quick Start - Make your first API call
- Authentication - Learn about API keys and JWT
- Python SDK - Full SDK documentation
- TypeScript SDK - Full SDK documentation