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

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

dataguard_cli-0.1.3.tar.gz (10.5 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.3-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dataguard_cli-0.1.3.tar.gz
  • Upload date:
  • Size: 10.5 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.3.tar.gz
Algorithm Hash digest
SHA256 0e42230675cf6cd84203d00189d670961a01a8cbc4032383c68da3072a9231c1
MD5 428d956c92a5a620c061cb277288220c
BLAKE2b-256 a6634d0d5841ede8f7dd32aa9ed1b5acce46ccdac8e13b27cc083e5b210c9115

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dataguard_cli-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.6 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1d7db54c1d82e5b2cbe9d0fb3b829a05d9b383f4786bec0c7d251a4a3d93c319
MD5 e5b6c5854771977ab9720b5b3d4d0bdb
BLAKE2b-256 0a2a907e8d2560940434323d42a6f89bd7616da1516aeba2fe7d0ef628a5f469

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