Turn messy public data into clean, ML-ready datasets.
Project description
DatasetForge
DatasetForge turns messy JSON sources into clean, reproducible datasets for analysis and ML workflows.
What it does
- Load local JSON or REST API responses
- Flatten nested JSON into tabular records
- Rename, select, and drop fields
- Fill missing values and deduplicate records
- Infer a simple schema summary
- Export CSV, JSON, and optional Parquet
- Write reproducible config, metadata, and dataset cards
- Run from a single CLI command
Install
pip install datasetforge-kit
For local development:
pip install -e .
Optional Parquet support:
pip install datasetforge-kit[parquet]
Quick start
Create a config file:
datasetforge init-config --path datasetforge.config.json
Run the pipeline:
datasetforge run --config datasetforge.config.json
Inspect the source:
datasetforge inspect --config datasetforge.config.json
Generate a schema summary:
datasetforge schema --config datasetforge.config.json
Config format
{
"name": "sample-dataset",
"source": {
"kind": "json_file",
"location": "data/input.json",
"records_key": null,
"line_delimited": false
},
"transforms": {
"flatten_separator": ".",
"rename": {"user.name": "name"},
"select": ["id", "name", "score"],
"drop": [],
"missing_tokens": ["", "null", "N/A"],
"fill_values": {"score": 0},
"dedupe_keys": ["id"],
"fuzzy_dedupe_keys": [],
"fuzzy_threshold": 0.0
},
"validation": {
"required_fields": ["id", "name"],
"field_types": {"id": "integer"},
"allowed_values": {}
},
"export": {
"format": "csv",
"path": "dist/sample-dataset.csv",
"indent": 2,
"include_metadata": false
},
"versioning": {
"enabled": true,
"directory": "dist/versions"
}
}
Python API
from datasetforge import load_config, run_pipeline
config = load_config("datasetforge.config.json")
result = run_pipeline(config)
print(result.export_path)
Notes
- Parquet export requires
pyarrow. - REST sources use the standard library HTTP client and expect JSON responses.
- Versioned runs write a deterministic content hash to the output path and manifest.
Roadmap
The library is structured for scheduled jobs, deeper schema rules, version history, fuzzy dedupe, and richer notebook helpers without changing the CLI contract.
Project details
Release history Release notifications | RSS feed
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 datasetforge_kit-0.1.0.tar.gz.
File metadata
- Download URL: datasetforge_kit-0.1.0.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d577e7fdfc7566c7e8d5d0e032db583529949ab92e4731505cf0c38a91ea92cf
|
|
| MD5 |
f8291923ac9f89dfa12c32bc39be58a9
|
|
| BLAKE2b-256 |
e1f68a87ea87a5721d34827d2d0460123caa047e5e61a8838903eb6580be6cbc
|
File details
Details for the file datasetforge_kit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: datasetforge_kit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b02fbc48685a62339c14b1d1201dfdc1c405669e4ef4b950d6b5c70e325bbca
|
|
| MD5 |
8afe5643008f7dcdc2d40879c29afe1b
|
|
| BLAKE2b-256 |
75633457b16ece9a03f6380b76959091270a336d5b60950b45048af61876ef25
|