A fast, modular CLI tool for data quality analysis, profiling, and cleaning using Polars and Rich.
Project description
DataGuard CLI
DataGuard CLI is a fast, modular data quality tool that helps developers validate, analyze, and clean datasets before using them in analytics or machine learning pipelines.
Built with Polars, Rich, and Typer, it provides a powerful command-line interface for profiling datasets and detecting issues such as missing values, duplicates, and inconsistent formats.
🚀 Features
- ⚡ Fast data profiling using Polars
- 🧠 Rule-based issue detection engine
- 📊 Dataset quality scoring system
- 🔍 Detailed column-level analysis
- 🛠️ Auto-fix functionality for cleaning data
- 📁 Batch processing for multiple datasets
- 🔒 Strict mode for pipeline enforcement
- 🎨 Rich CLI interface with tables and panels
- ⚙️ Configurable validation rules (YAML-based)
- ✅ Fully testable and modular architecture
📦 Installation
From PyPI
pip install dataguard-cli
From Source
git clone https://github.com/your-username/dataguard-cli.git
cd dataguard-cli
pip install -e .
🧑💻 Usage
Scan a dataset
dataguard scan data.csv
Show only important issues
dataguard scan data.csv --summary
Export report
dataguard scan data.csv --export report.json
Strict mode (CI/CD pipelines)
dataguard scan data.csv --strict
Fix dataset issues
dataguard fix data.csv
dataguard fix data.csv --apply-changes
Generate structured report
dataguard report data.csv
dataguard report data.csv --export report.json
Batch processing
dataguard batch ./datasets/
📊 Example Output
📊 Dataset Quality Score: 78/100 🟠
Column Type Null % Severity Issues
--------------------------------------------------------
age Int64 45% 3 High missing values
email String 5% 2 Invalid format
salary Float64 0% 0 Clean
⚙️ Configuration
Edit rules in:
dataguard/config/rules.yaml
Example:
null_thresholds:
critical: 30
warning: 0
duplicate_threshold: 0
constant_column: true
email_validation: true
🧪 Testing
pytest
🏗️ Architecture
CLI → Commands → Core Engine → Rules → UI
- CLI: Typer-based command interface
- Core: Rule engine and processing logic
- UI: Rich-based rendering
- Config: YAML-driven rules
💡 Why DataGuard?
Data quality issues are a major cause of:
- incorrect analytics
- unreliable ML models
- pipeline failures
DataGuard provides a lightweight and extensible way to enforce data validation before downstream usage.
🔮 Future Improvements
- Schema validation support
- ML-based anomaly detection
- Integration with data pipelines (Airflow, etc.)
- Plugin-based rule system
🛠️ Tech Stack
- Python
- Polars
- Rich
- Typer
- Pytest
👨💻 Author
Sarthak Dongare (Frosty-8)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dataguard_cli-0.1.2.tar.gz.
File metadata
- Download URL: dataguard_cli-0.1.2.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1f8dfc0cbd180b32a70cd5781cc6985adeb062d41d6979cc5a8f3cc66b91376
|
|
| MD5 |
5db96e895c5612e2ceaa58e08e20a788
|
|
| BLAKE2b-256 |
75ddba6727559a1d7d1141b85b499132039e13cf4eb6c8b881c14e8bf747bfb0
|
File details
Details for the file dataguard_cli-0.1.2-py3-none-any.whl.
File metadata
- Download URL: dataguard_cli-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
062b24f005e65137588d0533e2799d572de54fe4f96f941dbfbe59ccc8d00309
|
|
| MD5 |
f5a76a79247369892f5be6eb8d9f91bc
|
|
| BLAKE2b-256 |
53e33d21fee99972ffda308fe55c2da920ba8159baddc8e7f062b2ff4479c94b
|