Skip to main content

python-json2csv

Convert json array data to csv.

Note: zencore-json2csv rename to python-json2csv

Install

pip install python-json2csv

Usage

    E:\>json2csv --help
    Usage: json2csv [OPTIONS]

    Options:
    -f, --file FILENAME     Input file name, use - for stdin.
    --file-encoding TEXT    Input file encoding.
    -o, --output FILENAME   Output file name, use - for stdout.
    --output-encoding TEXT  Output file encoding.
    -k, --keys TEXT         Output field names. Comma separated string list.
    -p, --path TEXT         Path of the data.
    --help                  Show this message and exit.

Examples

Example 1

INPUT:

[
    [1,2,3],
    [2,3,4]
]

OUTPUT:

    1,2,3
    2,3,4

COMMAND:

cat input.txt | json2csv -o output.txt

Example 2

INPUT:

[
    {"f1": 11, "f2": 12, "f3": 13},
    {"f1": 21, "f3": 23, "f2": 22}
]

OUTPUT:

11,12,13
21,22,23

COMMAND:

cat input.txt | json2csv -o output.txt -k f1,f2,f3

Example 3

INPUT:

{
    "data": {
        "list": [
            [1,2,3],
            [2,3,4],
        ]
    }
}

OUTPUT:

1,2,3
2,3,4

COMMAND:

cat input.txt | json2csv -o output.txt -p data.list

Releases

v0.2.1 2022-01-10

  • Fix license file missing problem.

v0.2.0 2019-11-05

  • Rename from zencore-json2csv to python-json2csv.
  • Fix console application install method in setup.py.

v0.1.1 2018-02-27

  • Simple json2csv console utils released.

Release files for zencore-json2csv 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zencore-json2csv 0.2.1
File Size Uploaded
zencore-json2csv-0.2.1.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zencore-json2csv 0.2.1
File Interpreter ABI Platform
zencore_json2csv-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.4 kB

Release files / zencore-json2csv-0.2.1.tar.gz

Download URL zencore-json2csv-0.2.1.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d3308e91ae42fd432bde21a9ec955261b2811f62af6e03b47f58d0e38c85918f
BLAKE2b-256 checksum
How to use checksums
6023df49c6fbdd3dad7af9025de1bf4217fff1bebc2aee76150fdd3a2419f607
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / zencore_json2csv-0.2.1-py3-none-any.whl

Download URL zencore_json2csv-0.2.1-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
70a4e75b86092df7286e54f0ffb6b4fa79ee6c586ae1b774ca9f837e1e5eb755
BLAKE2b-256 checksum
How to use checksums
b54f17863d152de1e311870bda03d251f4af50d090e4f797bdc7cc1930aecf83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page