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. Think of it as a "recipe book" for messy data.
The Problem
The status quo for data cleaning is a maze of ever-growing Jupyter notebooks and manual Excel workbooks. Each refresh of a dataset means re-running cells in the right order, copying formulas, and hoping nothing breaks. The repetition is draining, and the chance of subtle mistakes is ever present.
The Solution
DataForge turns ad-hoc scripts into durable, versioned pipelines stored in MySQL. Capture each transformation step once, then rerun that exact recipe on demand—no notebook spelunking required and no manual tweaks lost to history.
Installation (The Easy Way)
DataForge is published on PyPI and works great with pipx.
sudo apt install pipx
pipx ensurepath
pipx install dataforge-cli
First-Time Setup (Database)
- Provision MySQL access
sudo mysqlCREATE USER 'dataforge_user'@'localhost' IDENTIFIED BY 'your_password_here'; GRANT ALL PRIVILEGES ON dataforge.* TO 'dataforge_user'@'localhost'; FLUSH PRIVILEGES;
- Run the interactive setup wizard (creates
~/.dataforge.envand initializes the schema):dataforge initYou can re-rundataforge initat any time to update credentials, or usedataforge db initif you only need to recreate the tables.
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"
Commands & Features
dataforge profile <filepath>– Generate a full CSV profile showing null counts, column types, and descriptive statistics.dataforge init– Guided wizard that writes~/.dataforge.envand provisions the schema.dataforge pipeline …– Manage cleaning recipes:create,add,show,rename, anddeletesteps stored in MySQL.dataforge run …– Execute an entire pipeline in batch mode to produce a clean dataset.dataforge run … --interactive– Walk through the pipeline step-by-step with a built-in Undo stack for experimentation.
Available Transformers
op_regex_replaceop_drop_nullsop_fill_nullsop_rename_columnop_drop_columnop_change_typeop_scale_minmaxop_one_hot_encode
Development & Running Tests
git clone https://github.com/bit2swaz/dataforge-python.git
cd dataforge-python
python -m venv venv
source venv/bin/activate
pip install -e ".[dev]"
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.2.1.tar.gz.
File metadata
- Download URL: dataforge_cli-0.2.1.tar.gz
- Upload date:
- Size: 9.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 |
e240f1eb67ca5aa976b48b157265c94a55bd25f047029a34d7337b912d2aebb6
|
|
| MD5 |
8af41424e9e44ccc8d4a55bd2430f9a6
|
|
| BLAKE2b-256 |
db5ff8ccc593e8570d2d93d782366d2f8d412a27fa90a3872a79b2cdedb27789
|
File details
Details for the file dataforge_cli-0.2.1-py3-none-any.whl.
File metadata
- Download URL: dataforge_cli-0.2.1-py3-none-any.whl
- Upload date:
- Size: 9.9 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 |
1a35f33e2a8a261b7fb37a15d3383a613c688d2dd4da30d0acecd8fdc09879d5
|
|
| MD5 |
1ba7846a7e91e3266c68af9f2e633ce4
|
|
| BLAKE2b-256 |
3d9472778aa014717ded44e5435653b817d9da60198aa0e4c78fb11fe1d577d1
|