Metadata-Version: 2.4
Name: driftwatch
Version: 0.2.0
Summary: Lightweight ML drift monitoring, built for real-world pipelines
Author-email: Your Name <your.email@example.com>
Maintainer-email: Your Name <your.email@example.com>
License: MIT
Project-URL: Homepage, https://github.com/YOUR_USERNAME/driftwatch
Project-URL: Documentation, https://driftwatch.readthedocs.io
Project-URL: Repository, https://github.com/YOUR_USERNAME/driftwatch
Project-URL: Issues, https://github.com/YOUR_USERNAME/driftwatch/issues
Project-URL: Changelog, https://github.com/YOUR_USERNAME/driftwatch/blob/main/CHANGELOG.md
Keywords: machine-learning,mlops,drift-detection,monitoring,data-quality,model-monitoring
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.21.0
Requires-Dist: pandas>=1.3.0
Requires-Dist: scipy>=1.7.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
Requires-Dist: pandas-stubs>=2.0.0; extra == "dev"
Provides-Extra: cli
Requires-Dist: typer>=0.9.0; extra == "cli"
Requires-Dist: rich>=13.0.0; extra == "cli"
Provides-Extra: fastapi
Requires-Dist: fastapi>=0.100.0; extra == "fastapi"
Requires-Dist: uvicorn>=0.23.0; extra == "fastapi"
Provides-Extra: mlflow
Requires-Dist: mlflow>=2.0.0; extra == "mlflow"
Provides-Extra: alerting
Requires-Dist: httpx>=0.24.0; extra == "alerting"
Requires-Dist: aiosmtplib>=2.0.0; extra == "alerting"
Provides-Extra: all
Requires-Dist: driftwatch[alerting,cli,fastapi,mlflow]; extra == "all"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.5.0; extra == "docs"
Requires-Dist: mkdocs-material>=9.0.0; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.23.0; extra == "docs"
Dynamic: license-file

# DriftWatch

<div align="center">

**Lightweight ML drift monitoring, built for real-world pipelines**

[![Documentation](https://img.shields.io/badge/docs-vincentcotella.github.io%2FDriftWatch-blue.svg)](https://vincentcotella.github.io/DriftWatch/)
[![CI](https://github.com/VincentCotella/DriftWatch/actions/workflows/ci.yml/badge.svg)](https://github.com/VincentCotella/DriftWatch/actions/workflows/ci.yml)
[![PyPI version](https://badge.fury.io/py/driftwatch.svg)](https://pypi.org/project/driftwatch/)
[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

</div>

---

## 📖 Documentation

**Read the full documentation here:** [vincentcotella.github.io/DriftWatch](https://vincentcotella.github.io/DriftWatch/)

## 🚀 Features

- **Simple API**: Detect drift in 3 lines of code.
- **Multiple Detectors**: **PSI**, **KS-Test**, **Wasserstein Distance**, **Chi-Squared**.
- **Production-Ready**:
    - ⚡ **FastAPI Integration** (Middleware included).
    - 🔔 **Slack Alerts** built-in.
    - 🛠️ **CLI** for batch processing.
- **Lightweight**: Minimal dependencies (`numpy`, `pandas`, `scipy`).
- **Type-Safe**: 100% typed code with `mypy` support.

## 📦 Installation

```bash
pip install driftwatch
```

For extras (CLI, FastAPI, Alerting):
```bash
pip install driftwatch[all]
```

## ⚡ Quick Start

```python
from driftwatch import Monitor
import pandas as pd

# 1. Initialize monitor with reference data (e.g., training set)
monitor = Monitor(reference_data=pd.read_parquet("train.parquet"))

# 2. Check production data for drift
report = monitor.check(pd.read_parquet("production.parquet"))

# 3. Act on results
if report.has_drift():
    print(f"⚠️ Drift detected! Ratio: {report.drift_ratio():.1%}")
    print(f"Drifted features: {report.drifted_features()}")
else:
    print("✅ All systems normal.")
```

## 🛠️ Usage Scenarios

| Scenario | Solution |
|----------|----------|
| **Real-time API** | Use `DriftMiddleware` in FastAPI to monitor every request. |
| **Batch Job** | Use `driftwatch check` CLI in your Airflow/Cron jobs. |
| **CI/CD** | Block deployments if validation data drifts from training data. |
| **Alerting** | Send Slack notifications automatically when drift is critical. |

## 🤝 Contributing

We welcome contributions! Please see our [Contributing Guide](https://vincentcotella.github.io/DriftWatch/contributing/) for details.

1. Fork the repo.
2. Install dev dependencies: `pip install -e ".[dev,all]"`
3. Run tests: `pytest`
4. Submit a PR!

## 📄 License

MIT © [Vincent Cotella](https://github.com/VincentCotella)
