Metadata-Version: 2.4
Name: qualidator
Version: 0.2.0
Summary: A lightweight data quality CLI tool
Author: Dima Frank
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: click
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 🛡️ Qualidator  
*A modern CLI for managing SQL-based data quality checks — now with connector setup.*

![Qualidator Banner](https://img.shields.io/badge/version-0.1.0-blue?style=for-the-badge)  
![Python](https://img.shields.io/badge/python-3.8%2B-brightgreen?style=for-the-badge)  
![License](https://img.shields.io/badge/license-MIT-lightgrey?style=for-the-badge)

---

## 📌 Overview
**Qualidator** is a command-line tool that helps you **define, manage, and store SQL-based data quality validations**.  
It can set up a connector to your data source and organize validation queries in a `.qualidations` folder for easy reuse and version control.

With Qualidator, you can:
- 📂 Initialize a validations project
- 🔌 Configure a connector (Databricks, Snowflake, Postgres, or None)
- ➕ Add a variety of built-in validation checks
- 🗑 Remove one or all validations
- 📊 View project status and existing validations
- 💥 Destroy the project

---

## 🚀 Installation

```bash
pip install qualidator
```
---

## ⚡ Usage
### Run qualidator --help to see available commands:
```bash
qualidator --help
```

| Command  | Description                                                            |
|----------|------------------------------------------------------------------------|
| `init`   | Initialize `.qualidations` and optionally set up a data connector      |
| `destroy`| Delete the `.qualidations` folder (use `--force` for full removal)     |
| `add`    | Add a validation                                                       |
| `remove` | Remove a validation or all validations                                 |
| `status` | Show project status and validations                                    |

---

## 🛠 Examples
### 1️⃣ Initialize and set up connector
```bash
qualidator init
```
## 📦 Creates .qualidations, then asks for a data provider:
1. Databricks
2. Snowflake
3. Postgres
4. None

### If you pick one of the first three, it prompts for credentials and saves them in:
```bash
.qualidations/config.json
```

### 2️⃣ Add validations
```bash
qualidator add --name is_not_null
```
```bash
Please enter the column name to check for NOT NULL: customer_id
✔ Will check that column "customer_id" is not null.
```

### Supported validations:
| Validation                       | Description                                  |
|----------------------------------|----------------------------------------------|
| `is_not_null`                    | Checks that column values are not null       |
| `column_values_are_unique`       | Checks that all values in a column are unique|
| `column_max_is_between`          | Checks that the maximum value is within range|
| `column_min_is_between`          | Checks that the minimum value is within range|
| `column_sum_is_between`          | Checks that the sum of values is within range|
| `column_values_are_between`      | Checks that all values are within range      |
| `column_mean_is_between`         | Checks that the mean value is within range   |


### 3️⃣ Check status
```bash
qualidator status
```

```bash
============================================================
📋 VALIDATIONS IN YOUR PROJECT
------------------------------------------------------------
1. customer_id_is_not_null
2. email_column_values_are_unique
------------------------------------------------------------
✅ Total: 2 validation(s) ready to go!
💡 You can remove with:
   qualidator remove --name your_validation_name
============================================================
```

### 4️⃣ Remove validations
#### Remove all:
```bash
qualidator remove --all
```
#### Remove one:
```bash
qualidator remove --name email_column_values_are_unique
```

### 5️⃣ Destroy project
```bash
qualidator destroy --force
```
#### This deletes .qualidations entirely (including config and validations).

---

## 📂 Project Structure
```css
qualidator/
│
├── inspectors/
│   ├── uniq.py
│   ├── numeric.py
│
├── __init__.py
├── main.py
└── README.md
```


## 🤝 Contributing
Pull requests and ideas are welcome!
Open an issue if you have suggestions for new validation types or integrations.

## 📜 License
This project is licensed under the MIT License.
