A CLI for reproducible data cleaning pipelines.
Project description
DataForge CLI
DataForge is a local-first, Python-based CLI for building and running reproducible data-cleaning pipelines.
The Problem
Cleaning data inside sprawling Jupyter notebooks or ad-hoc Excel sheets is repetitive, fragile, and easy to break. Each dataset requires copy/pasting logic, manual tweaks, and constant vigilance to avoid regressions.
The Solution
DataForge captures every cleaning step as an ordered, versionable pipeline stored in MySQL. Once your recipe is defined, you can rerun it on fresh data instantly—no notebooks to maintain, no spreadsheets to reconcile.
Core Features
dataforge profile: Instantly profile a CSV to inspect null counts, column types, medians, and more.dataforge pipeline: Create pipelines, append ordered steps, inspect them, rename, or delete outdated flows.dataforge run: Execute an entire pipeline in batch mode to transform messy CSVs into clean outputs.dataforge run --interactive: Step through each operation with Undo support for safe experimentation.
Tech Stack
Python · Click · Pandas · NumPy · MySQL · scikit-learn
Installation & Setup
- Clone the repository
git clone https://github.com/bit2swaz/dataforge-python.git cd dataforge-python
- Create a virtual environment
python -m venv venv source venv/bin/activate
- Install dependencies
pip install -r requirements.txt
- Configure environment variables
cp .env.example .env # Update credentials if necessary
- Prepare MySQL
CREATE DATABASE IF NOT EXISTS dataforge; CREATE USER 'dataforge_user'@'localhost' IDENTIFIED BY 'your_password'; GRANT ALL PRIVILEGES ON dataforge.* TO 'dataforge_user'@'localhost'; FLUSH PRIVILEGES;
- Create the schema
python db_init.py - Install DataForge in editable mode
pip install -e .
Quick Start (Usage)
# 1. Profile your data
dataforge profile messy_data.csv
# 2. Create a pipeline
dataforge pipeline create "my-first-cleaner"
# 3. Add cleaning steps
dataforge pipeline add "my-first-cleaner" --op "regex_replace" --params '{"column": "product_name", "pattern": "SKU-", "replace": ""}' --order 1
dataforge pipeline add "my-first-cleaner" --op "drop_nulls" --params '{"column": "email"}' --order 2
# 4. Run the pipeline!
dataforge run "my-first-cleaner" -i "messy_data.csv" -o "clean_output.csv"
Available Transformers
op_regex_replaceop_drop_nullsop_fill_nullsop_rename_columnop_drop_columnop_change_typeop_scale_minmaxop_one_hot_encode
Running Tests
pytest
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dataforge_cli-0.1.1.tar.gz.
File metadata
- Download URL: dataforge_cli-0.1.1.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75bda7dc1a6956120c00d40b181d2046684f43bb755168207f8e97c067a045eb
|
|
| MD5 |
2935dace57f6f2e6e781086e701d8104
|
|
| BLAKE2b-256 |
124ea527868d620dc62b893f2cd02c4309768927b9d1cf9c1c9dc907c6c2be9d
|
File details
Details for the file dataforge_cli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: dataforge_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22e2a34eba89e139b25f694e014f2ade0a28374e672cc759285a5f0283ae4170
|
|
| MD5 |
a13c6e6cd602a97f56365d9bd9574590
|
|
| BLAKE2b-256 |
9b56394296b8db70ebec4f7e14f35e66f41733589f09283b546d4251391c9ebd
|