Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datasetforge_kit-0.1.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datasetforge_kit-0.1.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

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

Hashes for datasetforge_kit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d577e7fdfc7566c7e8d5d0e032db583529949ab92e4731505cf0c38a91ea92cf
MD5 f8291923ac9f89dfa12c32bc39be58a9
BLAKE2b-256 e1f68a87ea87a5721d34827d2d0460123caa047e5e61a8838903eb6580be6cbc

See more details on using hashes here.

File details

Details for the file datasetforge_kit-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for datasetforge_kit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b02fbc48685a62339c14b1d1201dfdc1c405669e4ef4b950d6b5c70e325bbca
MD5 8afe5643008f7dcdc2d40879c29afe1b
BLAKE2b-256 75633457b16ece9a03f6380b76959091270a336d5b60950b45048af61876ef25

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page