Metadata-Version: 2.1
Name: datagen-cli
Version: 0.2.0
Summary: A colorful and interactive CLI tool to generate customizable synthetic datasets.
Author-email: Rishabh Kumar <rishabh.contact.info@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/Rishabh2728/datagen-cli
Keywords: dataset,data-generator,cli,faker,synthetic-data
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Utilities
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Environment :: Console
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer<0.21,>=0.20.0
Requires-Dist: rich>=13.0.0
Requires-Dist: faker>=24.0.0
Requires-Dist: pandas>=2.0.0
Requires-Dist: numpy>=1.25.0
Requires-Dist: openpyxl>=3.1.0

<p align="center">
  <img src="https://capsule-render.vercel.app/api?type=waving&color=0:8B0000,100:4B0082&height=200&section=header&text=DataGen%20CLI&fontSize=40&fontColor=ffffff&animation=fadeIn&fontAlignY=35" />
</p>

<p align="center">
  <b>Schema-driven synthetic data generation for developers & data scientists</b>
</p>

<p align="center">
  ⚡ Python API & CLI • 📊 DataFrame Ready • 🔍 Strict Validation • 📁 CSV / JSON / Excel
</p>

---

# 🚀 DataGen CLI

> Built an official Python library with **12K+ downloads** — designed to solve a real problem faced by data science students and developers:  
> **getting clean, structured, and usable datasets instantly.**

---

## ✨ About

Most tools generate random, unrealistic data.

**DataGen CLI is different.**

👉 Define your own schema  
👉 Generate meaningful, constraint-aware datasets  
👉 Use directly in Python or via CLI  

---

## 🔥 Key Features

- 🧠 **Schema-driven generation**
- 📊 **Returns pandas DataFrame**
- 💻 **Python + CLI support**
- 📁 Export to **CSV, JSON, Excel**
- 🔍 **Strict validation system**
- ⚡ Lightweight & fast
- 🧪 Fully tested (**24/24 tests passed**)

---

## ⚡ Quick Demo

### 🐍 Python

```python

from datagen import generate_dataset

schema = {
    "rows": 5,
    "columns": [
        {"name": "name"},
        {"name": "age", "generator": "int", "params": {"min": 18, "max": 60}},
        {"name": "salary", "generator": "int", "params": {"min": 30000, "max": 100000}}
    ]
}

df = generate_dataset(schema)
print(df)

```

### 💻 CLI
```bash
datagen generate schema.json --rows 100 --output data.csv
```

### 🧾 Example Output
```
        name   age    salary
0   Rahul Sharma   25   54000
1   Priya Verma   32   72000
2   Aman Gupta    28   61000
```

---

## 🧩 Architecture
```
datagen/
│
├── core/
│   ├── engine.py
│   ├── defaults.py
│   ├── schema_normalizer.py
│   └── schema_validator.py
│
├── cli/
│   ├── app.py
│   └── main.py
│
├── __init__.py
│
tests/
├── test_cli.py
└── test_core.py
```

---

## ⚙️ Phase 1 — Core Engine (Completed ✅)

### ✔️ Implemented

- Schema-driven engine (`DataGenerationEngine`)
- Python API (`generate()` → DataFrame)
- CLI (Typer-based interface)
- Schema normalization
- Strict validation system
- File export support
- Testing suite

### 🔒 Validation Rules

- ✔️ `min <= max` for numeric fields
- ✔️ Precision must be positive
- ✔️ Date ranges must be valid
- ✔️ Choice fields must not be empty
- ✔️ Unsupported types are rejected

---

## 🚀 Installation
```bash
pip install datagen
```

---

## 💻 CLI Commands

| Command    | Description          |
|------------|----------------------|
| `generate` | Generate dataset     |
| `preview`  | Preview sample data  |
| `validate` | Validate schema      |

---

## 📤 Export Formats

- CSV
- JSON
- Excel (`.xlsx`)

---

## ⚡ Performance

- ⚡ Lightweight package (KBs only)
- 🚀 Tested with 1 crore rows × 17 columns
- 🧠 Efficient memory usage

---

## 🔮 Roadmap

### Phase 2 (Next)

- 🌍 Region-based datasets (India 🇮🇳, US 🇺🇸)
- 🔗 Relationship-aware data (city → state, salary → role)

### Phase 3

- 🤖 Smart generation (learning from real datasets)

---

## 🧪 Testing

**24 passed, 0 failed ✅**

Includes:
- Core engine tests
- CLI tests
- Validation tests

---

## 🤝 Contributing
```bash
git clone https://github.com/your-username/datagen-cli
cd datagen-cli
pip install -r requirements.txt
```

---

## 👨‍💻 Author

**Rishabh Kumar**

- Built to solve a real-world problem faced during learning data science
- Already helping thousands generate datasets instantly
- Now evolving into a full-scale synthetic data engine

---

## ⭐ Support

If this project helped you:

👉 Star the repo  
👉 Share it  
👉 Use it in your projects  

---

## 💡 Vision

> Data shouldn't be the bottleneck.  
> It should be generated instantly.
