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.1.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.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dataguard_cli-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 cb4bbdd0d4b704d69c976c30ec0b7b197b0dfaf7ae525bea46e43acae1a3cdef
MD5 a728e928ac74f0b681fb0a932d1c7a53
BLAKE2b-256 fd6016a0095249571baca1d64d78a6942eb0268cbed7415891a2b34169f43fe4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dataguard_cli-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ebf463795cba57959e83b512a2271676eb7aaed36376a732dbd41b5ad5361ac
MD5 f790e19f36af9073e09d298eacc67842
BLAKE2b-256 97d89ac2d3a0f3a0e46669c4462ff01eba205b0a1685e1f22be9bf8a39d609e3

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