You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

dataknead

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dataknead

Fluent conversion between data formats like JSON, XML and CSV

0.4.0
pipPyPI
Maintainers
1

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!.

Keywords

data

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts