Skip to main content

Fluent conversion between data formats like JSON, XML and CSV

Project description

dataknead

Fluent conversion between data formats like JSON, XML and CSV

Read the docs

Ever sighed when you wrote code to convert CSV to JSON for the thousandth time?

import csv
import json

data = []

with open("cities.csv") as f:
    reader = csv.DictReader(f)

    for row in reader:
        data.append(row)

with open("cities.json", "w") as f:
    json.dump(data, f)

Stop sighing and use dataknead. Fetch it with pip:

$ pip install dataknead

And use it like this:

from dataknead import Knead
Knead("cities.csv").write("cities.json")

Or make it even easier on the command line:

knead cities.csv cities.json

dataknead has inbuilt loaders for CSV, Excel, JSON, TOML and XML and you can easily write your own.

Piqued your interest? Read the docs!.

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

dataknead-0.4.0.tar.gz (8.6 kB view hashes)

Uploaded Source

Built Distribution

dataknead-0.4.0-py3-none-any.whl (11.1 kB view hashes)

Uploaded Python 3

Supported by

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