Installation Guide¶
This guide covers installation and setup of the ReZEN Python API client.
📋 Requirements¶
- Python: 3.7 or higher
- Operating Systems: Windows, macOS, Linux
- Internet connection for package installation and API access
🚀 Quick Installation¶
From PyPI (Recommended)¶
From Source¶
Development Installation¶
🔧 Environment Setup¶
1. API Key Configuration¶
You'll need a ReZEN API key. Get one from the ReZEN platform dashboard.
Option A: Environment Variable (Recommended)¶
Linux/macOS:
Windows Command Prompt:
Windows PowerShell:
Option B: .env
File¶
Create a .env
file in your project root:
Then load it in your Python code:
from dotenv import load_dotenv
load_dotenv()
from rezen import RezenClient
client = RezenClient() # Will automatically use the API key from .env
Option C: Direct Initialization¶
from rezen import RezenClient
client = RezenClient(api_key="real_v2neAIGs2QEYJ14ck8uypMsBqOquT9TgmMzf")
2. Virtual Environment Setup (Recommended)¶
Create an isolated environment for your project:
# Create virtual environment
python -m venv rezen-env
# Activate (Linux/macOS)
source rezen-env/bin/activate
# Activate (Windows)
rezen-env\Scripts\activate
# Install rezen
pip install rezen
📦 Dependencies¶
The ReZEN client automatically installs these dependencies:
- requests - HTTP client for API calls
- typing-extensions - Enhanced type hints (Python < 3.8)
Optional Dependencies¶
For development and testing:
This includes: - pytest - Testing framework - pytest-cov - Coverage reporting - black - Code formatting - isort - Import sorting - mypy - Type checking - python-dotenv - Environment variable loading
✅ Verify Installation¶
Test your installation with this simple script:
from rezen import RezenClient
# Initialize client
client = RezenClient()
# Test connection (this will validate your API key)
try:
# Simple API call to verify connection
teams = client.teams.search_teams(limit=1)
print("✅ Installation successful!")
print(f"Connected to ReZEN API")
except Exception as e:
print(f"❌ Installation issue: {e}")
print("Check your API key and internet connection")
🐛 Troubleshooting¶
Common Installation Issues¶
1. Permission Errors¶
# Use --user flag
pip install --user rezen
# Or use virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Linux/macOS
pip install rezen
2. Python Version Issues¶
# Check Python version
python --version
# Use specific Python version
python3.8 -m pip install rezen
3. Network/Proxy Issues¶
# Behind corporate firewall
pip install --trusted-host pypi.org --trusted-host pypi.python.org rezen
# Using proxy
pip install --proxy http://proxy.company.com:8080 rezen
4. SSL Certificate Issues¶
# Disable SSL verification (not recommended for production)
pip install --trusted-host pypi.org rezen
API Key Issues¶
Invalid API Key Error¶
from rezen.exceptions import AuthenticationError
try:
client = RezenClient(api_key="invalid_key")
teams = client.teams.search_teams()
except AuthenticationError as e:
print(f"Authentication failed: {e}")
print("Check your API key")
Environment Variable Not Found¶
import os
# Check if API key is set
api_key = os.getenv('REZEN_API_KEY')
if not api_key:
print("❌ REZEN_API_KEY environment variable not set")
print("Set it with: export REZEN_API_KEY='your_key_here'")
else:
print(f"✅ API key found: {api_key[:10]}...")
🔧 Advanced Configuration¶
Custom Base URLs¶
For enterprise or testing environments:
from rezen import RezenClient
# Custom API base URL
client = RezenClient(
api_key="your_key",
base_url="https://api-staging.rezen.com"
)
Timeout Configuration¶
Configure request timeouts for your environment:
from rezen.base_client import BaseClient
# Configure global timeout (affects all clients)
BaseClient.DEFAULT_TIMEOUT = 30 # 30 seconds
Request Debugging¶
Enable request/response logging:
import logging
# Enable debug logging
logging.basicConfig(level=logging.DEBUG)
# Your ReZEN client calls will now show detailed request/response info
from rezen import RezenClient
client = RezenClient()
🔄 Upgrading¶
Check Current Version¶
Upgrade to Latest¶
Specific Version¶
📋 Next Steps¶
After successful installation:
- Quick Start Guide - Your first API calls
- API Reference - Complete endpoint documentation
- Examples - Real-world usage patterns
- Error Handling - Handle edge cases
💡 Tips¶
Production Deployments¶
-
Pin versions in requirements.txt:
-
Use environment variables for API keys (never commit keys to source control)
-
Set up monitoring for API rate limits and errors
-
Consider caching for frequently accessed data
Development Best Practices¶
- Use virtual environments to isolate dependencies
- Add
.env
to `.gitignore to avoid committing secrets - Use type hints for better IDE support
- Write tests for your integration code
🎉 Ready to start building with ReZEN! Continue to the Quick Start Guide for your first API calls.