Metadata-Version: 2.4
Name: driftguard-mehosni
Version: 0.1.2
Summary: Enterprise-grade real-time ML model drift monitoring
Author-email: AI Developer <developer@example.com>
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.20.0
Requires-Dist: scipy>=1.7.0
Requires-Dist: pandas>=1.3.0
Requires-Dist: requests>=2.25.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: isort>=5.0.0; extra == "dev"
Requires-Dist: flake8>=4.0.0; extra == "dev"
Dynamic: license-file

# DriftGuard 🛡️

*Enterprise-grade real-time ML model drift monitoring.*

DriftGuard is a professional Python library designed for MLOps Engineers and Data Scientists to detect **Data Drift** and **Concept Drift** in production environments.

## Features

- **Statistical Drift Detection**: Built-in support for Kolmogorov-Smirnov Test and Population Stability Index (PSI).
- **Extensible**: Easy to create custom detectors by inheriting from `BaseDetector`.
- **Alerting System**: Built-in Webhook integration to send real-time alerts to Slack, Microsoft Teams, etc.

## Installation

You can install DriftGuard locally:

```bash
pip install -e .
```

## Quick Start

```python
import numpy as np
from driftguard.detectors.ks_drift import KSDriftDetector

# 1. Reference Data (e.g. from your Training Set)
reference_data = np.random.normal(0, 1, 1000)

# 2. Initialize and fit the detector
detector = KSDriftDetector(threshold=0.05)
detector.fit(reference_data)

# 3. New Data (e.g. Production Data)
current_data = np.random.normal(1.5, 1.5, 1000)

# 4. Detect Drift
report = detector.detect(current_data)

print(report)
# {0: {'detector': 'Kolmogorov-Smirnov Test', 'drift_detected': True, 'metrics': {'ks_statistic': ..., 'p_value': ...}, 'threshold': 0.05}}
```

## Running Tests

To run the unit tests:

```bash
pip install pytest
pytest tests/
```
