Skip to content

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

pip install rezen

From Source

git clone https://github.com/theperrygroup/rezen.git
cd rezen
pip install .

Development Installation

git clone https://github.com/theperrygroup/rezen.git
cd rezen
pip install -e .

🔧 Environment Setup

1. API Key Configuration

You'll need a ReZEN API key. Get one from the ReZEN platform dashboard.

Linux/macOS:

export REZEN_API_KEY="real_v2neAIGs2QEYJ14ck8uypMsBqOquT9TgmMzf"

Windows Command Prompt:

set REZEN_API_KEY=real_v2neAIGs2QEYJ14ck8uypMsBqOquT9TgmMzf

Windows PowerShell:

$env:REZEN_API_KEY="real_v2neAIGs2QEYJ14ck8uypMsBqOquT9TgmMzf"

Option B: .env File

Create a .env file in your project root:

REZEN_API_KEY=real_v2neAIGs2QEYJ14ck8uypMsBqOquT9TgmMzf

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")

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:

pip install rezen[dev]

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

import rezen
print(f"Current version: {rezen.__version__}")

Upgrade to Latest

pip install --upgrade rezen

Specific Version

pip install rezen==1.0.7

📋 Next Steps

After successful installation:

  1. Quick Start Guide - Your first API calls
  2. API Reference - Complete endpoint documentation
  3. Examples - Real-world usage patterns
  4. Error Handling - Handle edge cases

💡 Tips

Production Deployments

  1. Pin versions in requirements.txt:

    rezen==1.0.7
    

  2. Use environment variables for API keys (never commit keys to source control)

  3. Set up monitoring for API rate limits and errors

  4. Consider caching for frequently accessed data

Development Best Practices

  1. Use virtual environments to isolate dependencies
  2. Add .env to `.gitignore to avoid committing secrets
  3. Use type hints for better IDE support
  4. Write tests for your integration code

🎉 Ready to start building with ReZEN! Continue to the Quick Start Guide for your first API calls.