Skip to main content

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

Your Name

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

dataguard_cli-0.1.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dataguard_cli-0.1.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file dataguard_cli-0.1.0.tar.gz.

File metadata

  • Download URL: dataguard_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for dataguard_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ff88aa1a57920d6e13a2add316a1fc1b95878a3a5241775fac0c5839541a9d2e
MD5 e08bf6eb211e9a14cec9addd3720c5fa
BLAKE2b-256 9c8d726a6020e9020a737f721fe012e1f480d30df6f572cf11938938e463f945

See more details on using hashes here.

File details

Details for the file dataguard_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dataguard_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for dataguard_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8cb80e3b6b29cecfc2126ca30ddb975cff9411585e141ab318cf6da421b0354
MD5 68b46665cb4f19fb38d7e81cf8002faa
BLAKE2b-256 38c1f20571cfebad26675cca4d951053e70fb4b390f1ba254dbfb977f9259138

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page