Skip to content

Installation Guide

Prerequisites

Before installing ZephCast, ensure you have:

  • Python 3.10 or higher
  • pip or poetry for package management
  • (Optional) Docker for running message brokers locally

Installation Methods

Poetry is the recommended way to install ZephCast as it provides better dependency management:

# Install poetry if you haven't already
curl -sSL https://install.python-poetry.org | python3 -

# Install ZephCast
poetry add zephcast

Using pip

You can also install ZephCast using pip:

pip install zephcast

Installing Optional Dependencies

ZephCast uses a modular dependency system. You can install only what you need:

# Install with specific broker support
poetry add zephcast[kafka]    # Kafka support (sync and async)
poetry add zephcast[rabbit]   # RabbitMQ support (sync and async)
poetry add zephcast[redis]    # Redis support (sync and async)

# Install only async support
poetry add zephcast[async]    # All async clients
poetry add zephcast[aio]      # Alias for async, all async clients
poetry add zephcast[async-kafka]   # Only async Kafka
poetry add zephcast[async-rabbit]  # Only async RabbitMQ
poetry add zephcast[async-redis]   # Only async Redis

# Install only sync support
poetry add zephcast[sync]     # All sync clients
poetry add zephcast[sync-kafka]    # Only sync Kafka
poetry add zephcast[sync-rabbit]   # Only sync RabbitMQ
poetry add zephcast[sync-redis]    # Only sync Redis

# Install everything
poetry add zephcast[all]

With pip:

# Install with specific broker support
pip install zephcast[kafka]    # Kafka support (sync and async)
pip install zephcast[rabbit]   # RabbitMQ support (sync and async)
pip install zephcast[redis]    # Redis support (sync and async)

# Install only async support
pip install zephcast[async]    # All async clients
pip install zephcast[aio]      # Alias for async, all async clients
pip install zephcast[async-kafka]   # Only async Kafka
pip install zephcast[async-rabbit]  # Only async RabbitMQ
pip install zephcast[async-redis]   # Only async Redis

# Install only sync support
pip install zephcast[sync]     # All sync clients
pip install zephcast[sync-kafka]    # Only sync Kafka
pip install zephcast[sync-rabbit]   # Only sync RabbitMQ
pip install zephcast[sync-redis]    # Only sync Redis

# Install everything
pip install zephcast[all]

Setting Up Message Brokers

Local Development

For local development, you can use Docker to run the message brokers:

# Create a docker-compose.yml file
cat > docker-compose.yml << EOL
version: '3'
services:
  kafka:
    image: confluentinc/cp-kafka:latest
    ports:
      - "9092:9092"
    environment:
      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
      KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1

  rabbitmq:
    image: rabbitmq:3-management
    ports:
      - "5672:5672"
      - "15672:15672"

  redis:
    image: redis:latest
    ports:
      - "6379:6379"
EOL

# Start the services
docker-compose up -d

Production Setup

For production, you'll want to use managed services or proper cluster setups:

Verifying Installation

You can verify your installation by running:

import zephcast
print(zephcast.__version__)

Or by running the test suite:

poetry run pytest

Next Steps