🔧 Installation Guide#

This guide covers everything you need to install and set up Stream DaQ in different environments.

Basic Installation#

Stream DaQ is available on PyPI and can be installed with pip:

pip install streamdaq

Requirements

  • Python: 3.11 or higher

  • Operating System: Windows, macOS, or Linux

Verify Your Installation#

Test that Stream DaQ is properly installed:

import streamdaq
python -c "import streamdaq; print(f'Version: {streamdaq.__version__} ✅')"

Expected Output

You should see the installed version of Stream DaQ, e.g., Version: 0.1.8 ✅. If you see an error, check your Python version and ensure pip is installed correctly.

Development Installation#

If you want to contribute to Stream DaQ or use the latest development version:

# Clone the repository
git clone https://github.com/bilpapster/stream-DaQ.git
cd stream-DaQ

# Install in editable mode
pip install -e .

# Install development dependencies
pip install -r requirements-dev.txt

Virtual Environment Setup#

We recommend using a virtual environment to avoid dependency conflicts:

# Create virtual environment
python -m venv streamdaq_env

# Activate it
# On Windows:
streamdaq_env\Scripts\activate
# On macOS/Linux:
source streamdaq_env/bin/activate

# Install Stream DaQ
pip install streamdaq
# Create conda environment
conda create -n streamdaq python=3.11
conda activate streamdaq

# Install Stream DaQ
pip install streamdaq
# Initialize Poetry project
poetry init
poetry add streamdaq

# Activate shell
poetry shell

Docker Installation#

Run Stream DaQ in a Docker container:

FROM python:3.11-slim

WORKDIR /app

# Install Stream DaQ
RUN pip install streamdaq

# Copy your monitoring scripts
COPY . .

CMD ["python", "your_monitoring_script.py"]

Build and run:

docker build -t my-streamdaq-app .
docker run my-streamdaq-app

Troubleshooting#

Common Installation Issues#

Issue: ModuleNotFoundError: No module named 'streamdaq'

Solution: Make sure you've activated the correct virtual environment
and that the installation completed successfully.

Issue: Python version compatibility error

Solution: Stream DaQ requires Python 3.11+. Check your version:
python --version

Issue: Permission denied during installation

Solution: Use --user flag or virtual environment:
pip install --user streamdaq

Issue: Network/firewall blocking PyPI access

Solution: Configure pip to use your corporate proxy:
pip install --proxy http://your-proxy:port streamdaq

Performance Considerations#

For high-volume streams (>10,000 events/second):

# Install with performance optimizations
pip install streamdaq[performance]

Memory usage guidelines:

  • Small streams (<1,000 events/sec): 256MB RAM

  • Medium streams (1,000-10,000 events/sec): 512MB RAM

  • Large streams (>10,000 events/sec): 1GB+ RAM

Testing Your Setup#

Run this comprehensive test to ensure everything works:

from streamdaq import StreamDaQ, DaQMeasures as dqm, Windows
import pandas as pd
from datetime import datetime

def test_streamdaq_installation():
    """Test basic Stream DaQ functionality"""
    try:
        # Create test data
        test_data = pd.DataFrame({
            'value': [1, 2, 3, 4, 5],
            'timestamp': pd.date_range('2024-01-01', periods=5, freq='1S'),
            'group_id': ['A', 'A', 'B', 'B', 'A']
        })

        # Set up monitor
        daq = StreamDaQ().configure(
            window=Windows.tumbling(3),
            instance="group_id",
            time_column="timestamp"
        )

        # Add a simple check
        daq.add(dqm.count('value'), assess=">0", name="has_data")

        # Test monitoring
        results = daq.watch_out(test_data)

        print("✅ Stream DaQ installation test passed!")
        print(f"✅ Processed {len(test_data)} test records")
        print("✅ Ready for real-time monitoring!")

        return True

    except Exception as e:
        print(f"❌ Installation test failed: {e}")
        return False

if __name__ == "__main__":
    test_streamdaq_installation()

IDE Integration#

VS Code: Install the Python extension and configure your interpreter to point to your virtual environment.

PyCharm: Add your virtual environment as a project interpreter in Settings > Project > Python Interpreter.

Jupyter: Install in your environment and register the kernel:

pip install jupyter
python -m ipykernel install --user --name=streamdaq

Next Steps#

Now that Stream DaQ is installed:

Need Help?#